From: Max Kellermann Date: Tue, 18 Nov 2008 20:51:40 +0000 (+0100) Subject: screen_{file,artist,search}: repaint only if screen is visible X-Git-Tag: v0.12_beta1~44 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a094e912687b2e1078ee2808a049f94b15325b79;p=ncmpc.git screen_{file,artist,search}: repaint only if screen is visible Don't repaint the screen after browser_cmd() if another screen has been selected meanwhile. --- diff --git a/src/screen_artist.c b/src/screen_artist.c index c66ae53..74fd96c 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -663,7 +663,8 @@ artist_cmd(mpdclient_t *c, command_t cmd) } if (artist_lw_cmd(c, cmd)) { - artist_repaint(); + if (screen_is_visible(&screen_artist)) + artist_repaint(); return 1; } diff --git a/src/screen_file.c b/src/screen_file.c index 0c24af2..aabac7a 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -266,7 +266,8 @@ browse_cmd(mpdclient_t *c, command_t cmd) } if (browser_cmd(&browser, c, cmd)) { - file_repaint(); + if (screen_is_visible(&screen_browse)) + file_repaint(); return 1; } diff --git a/src/screen_search.c b/src/screen_search.c index 48afb4e..e5239b0 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -450,7 +450,8 @@ search_cmd(mpdclient_t *c, command_t cmd) if (browser.filelist != NULL && browser_cmd(&browser, c, cmd)) { - search_repaint(); + if (screen_is_visible(&screen_search)) + search_repaint(); return 1; }