From db3d8351879b4c69408be0e25f45cd514ad42044 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Sep 2008 17:40:36 +0200 Subject: [PATCH] screen: don't call wrefresh() in methods paint() and update() screen_paint() and screen_update() are responsible for refreshing the screen. We can remove all wrefresh() and wnoutrefresh() invocations from all paint() and update() method implementations. --- src/screen_artist.c | 2 -- src/screen_file.c | 2 -- src/screen_help.c | 1 - src/screen_keydef.c | 2 -- src/screen_lyrics.c | 5 +---- src/screen_play.c | 2 -- src/screen_search.c | 3 --- 7 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/screen_artist.c b/src/screen_artist.c index bf7e54d..6857b66 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -223,8 +223,6 @@ paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) wmove(browser.lw->w, 0, 0); wclrtobot(browser.lw->w); } - - wnoutrefresh(browser.lw->w); } static void diff --git a/src/screen_file.c b/src/screen_file.c index 8f9c6c8..a3bf192 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -178,7 +178,6 @@ static void browse_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { list_window_paint(browser.lw, browser_lw_callback, browser.filelist); - wnoutrefresh(browser.lw->w); } static void @@ -191,7 +190,6 @@ browse_update(screen_t *screen, mpdclient_t *c) } list_window_paint(browser.lw, browser_lw_callback, browser.filelist); - wnoutrefresh(browser.lw->w); } static int diff --git a/src/screen_help.c b/src/screen_help.c index eec76d1..cbdd66c 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -211,7 +211,6 @@ static void help_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { list_window_paint(lw, list_callback, NULL); - wrefresh(lw->w); } static int diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 38ba315..f6ae3d3 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -281,7 +281,6 @@ static void keydef_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { list_window_paint(lw, list_callback, NULL); - wrefresh(lw->w); } static void @@ -289,7 +288,6 @@ keydef_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { if (lw->repaint) { list_window_paint(lw, list_callback, NULL); - wrefresh(lw->w); lw->repaint = 0; } } diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 1525800..50f41b7 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -169,8 +169,6 @@ screen_lyrics_load(struct mpd_song *song) screen_lyrics_callback, NULL); } -static void lyrics_paint(screen_t *screen, mpdclient_t *c); - static FILE *create_lyr_file(const char *artist, const char *title) { char path[1024]; @@ -265,7 +263,6 @@ static void lyrics_paint(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { list_window_paint(lw, list_callback, NULL); - wrefresh(lw->w); } @@ -274,7 +271,6 @@ lyrics_update(mpd_unused screen_t *screen, mpd_unused mpdclient_t *c) { if( lw->repaint ) { list_window_paint(lw, list_callback, NULL); - wrefresh(lw->w); lw->repaint = 0; } } @@ -302,6 +298,7 @@ lyrics_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) if (c->song != NULL) { screen_lyrics_load(c->song); lyrics_paint(NULL, NULL); + wrefresh(lw->w); } return 1; default: diff --git a/src/screen_play.c b/src/screen_play.c index 579d4f4..6eac958 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -362,7 +362,6 @@ static void play_paint(mpd_unused screen_t *screen, mpdclient_t *c) { list_window_paint(lw, list_callback, (void *) c); - wnoutrefresh(lw->w); } static void @@ -393,7 +392,6 @@ play_update(screen_t *screen, mpdclient_t *c) playlist_id = c->playlist.id; } else { list_window_paint(lw, list_callback, (void *) c); - wnoutrefresh(lw->w); } } diff --git a/src/screen_search.c b/src/screen_search.c index 5995b79..7234090 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -401,8 +401,6 @@ paint(mpd_unused screen_t *screen, mpdclient_t *c) // wmove(lw->w, 0, 0); //wclrtobot(lw->w); } - - wnoutrefresh(browser.lw->w); } static void @@ -414,7 +412,6 @@ update(screen_t *screen, mpdclient_t *c) } list_window_paint(browser.lw, browser_lw_callback, browser.filelist); - wnoutrefresh(browser.lw->w); } static const char * -- 2.30.2