From a094e912687b2e1078ee2808a049f94b15325b79 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Nov 2008 21:51:40 +0100 Subject: [PATCH] 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. --- src/screen_artist.c | 3 ++- src/screen_file.c | 3 ++- src/screen_search.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) 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; } -- 2.30.2