From 32f329d4efcbc8a1ce16af51e35392b1b6aa1326 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Sep 2008 10:20:57 +0200 Subject: [PATCH] screen: don't set list_window->repaint Several screens ignore the attribute list_window->repaint. Don't set it there. It will be replaced with a more intelligent repaint algorithm later. --- src/screen_artist.c | 2 -- src/screen_file.c | 1 - src/screen_play.c | 7 +------ 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/screen_artist.c b/src/screen_artist.c index cf2d310..de0466c 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -163,7 +163,6 @@ browse_callback(mpdclient_t *c, int event, mpd_unused gpointer data) case BROWSE_DB_UPDATED: D("screen_artist.c> browse_callback() [BROWSE_DB_UPDATED]\n"); browser.lw->clear = 1; - browser.lw->repaint = 1; update_metalist(c, g_strdup(artist), g_strdup(album)); break; default: @@ -420,7 +419,6 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_SCREEN_UPDATE: screen->painted = 0; browser.lw->clear = 1; - browser.lw->repaint = 1; update_metalist(c, g_strdup(artist), g_strdup(album)); screen_status_printf(_("Screen updated!")); return 0; diff --git a/src/screen_file.c b/src/screen_file.c index 26b2739..083b5e3 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -226,7 +226,6 @@ browse_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_SCREEN_UPDATE: screen->painted = 0; browser.lw->clear = 1; - browser.lw->repaint = 1; browser.filelist = mpdclient_filelist_update(c, browser.filelist); list_window_check_selected(browser.lw, filelist_length(browser.filelist)); diff --git a/src/screen_play.c b/src/screen_play.c index 7c2dc42..bea8e12 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -71,7 +71,6 @@ playlist_changed_callback(mpdclient_t *c, int event, gpointer data) } /* make shure the playlist is repainted */ lw->clear = 1; - lw->repaint = 1; list_window_check_selected(lw, c->playlist.list->len); } @@ -145,7 +144,6 @@ save_post_completion_cb(mpd_unused GCompletion *gcmp, mpd_unused gchar *line, if( g_list_length(items)>=1 ) { screen_display_completion_list(screen, items); lw->clear = 1; - lw->repaint = 1; } } @@ -276,7 +274,6 @@ static void add_post_completion_cb(GCompletion *gcmp, gchar *line, { screen_display_completion_list(screen, items); lw->clear = 1; - lw->repaint = 1; } if( line && line[0] && line[strlen(line)-1]=='/' && @@ -410,10 +407,9 @@ play_update(screen_t *screen, mpdclient_t *c) play_paint(screen, c); playlist_id = c->playlist.id; - } else if( lw->repaint || 1) { + } else { list_window_paint(lw, list_callback, (void *) c); wnoutrefresh(lw->w); - lw->repaint = 0; } } @@ -477,7 +473,6 @@ play_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_SCREEN_UPDATE: screen->painted = 0; lw->clear = 1; - lw->repaint = 1; center_playing_item(c); return 1; case CMD_LIST_MOVE_UP: -- 2.30.2