From 0884a2374860cbd1fad2b26443943ebd7765ec34 Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Tue, 22 Jun 2004 15:14:34 +0000 Subject: [PATCH] Clear the main window on CMD_SCREEN_UPDATE git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1617 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/screen.c | 5 +++++ src/screen_file.c | 3 +++ src/screen_play.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/screen.c b/src/screen.c index 8d517c9..ba155a4 100644 --- a/src/screen.c +++ b/src/screen.c @@ -590,6 +590,7 @@ screen_init(mpdclient_t *c) void screen_paint(mpdclient_t *c) { + D("screen_paint()\n"); /* paint the title/header window */ if( mode_fn && mode_fn->get_title ) paint_top_window(mode_fn->get_title(screen->buf,screen->buf_size), c, 1); @@ -597,6 +598,7 @@ screen_paint(mpdclient_t *c) paint_top_window("", c, 1); /* paint the main window */ + wclear(screen->main_window.w); if( mode_fn && mode_fn->paint ) mode_fn->paint(screen, c); @@ -808,6 +810,9 @@ screen_cmd(mpdclient_t *c, command_t cmd) _("Auto center mode: On") : _("Auto center mode: Off")); break; + case CMD_SCREEN_UPDATE: + screen->painted = 0; + break; case CMD_SCREEN_PREVIOUS: if( screen->mode > SCREEN_PLAY_WINDOW ) new_mode = screen->mode - 1; diff --git a/src/screen_file.c b/src/screen_file.c index 8b79f27..3fbdf43 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -572,6 +572,9 @@ browse_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) handle_delete(screen, c); break; case CMD_SCREEN_UPDATE: + screen->painted = 0; + lw->clear = 1; + lw->repaint = 1; filelist = mpdclient_filelist_update(c, filelist); list_window_check_selected(lw, filelist->length); screen_status_printf(_("Screen updated!")); diff --git a/src/screen_play.c b/src/screen_play.c index b112298..3478987 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -383,6 +383,9 @@ play_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) handle_add_to_playlist(screen, c); return 1; case CMD_SCREEN_UPDATE: + screen->painted = 0; + lw->clear = 1; + lw->repaint = 1; center_playing_item(screen, c); return 1; case CMD_LIST_MOVE_UP: -- 2.30.2