diff options
author | Max Kellermann <max@duempel.org> | 2008-11-18 21:51:40 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-18 21:51:40 +0100 |
commit | a094e912687b2e1078ee2808a049f94b15325b79 (patch) | |
tree | f58561dac47fd663a3b8ec9d635e28e7b44f776b /src | |
parent | e12ebb484bf369ea425e93521d99cc6813996e4e (diff) | |
download | mpd-a094e912687b2e1078ee2808a049f94b15325b79.tar.gz mpd-a094e912687b2e1078ee2808a049f94b15325b79.tar.xz mpd-a094e912687b2e1078ee2808a049f94b15325b79.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/screen_artist.c | 3 | ||||
-rw-r--r-- | src/screen_file.c | 3 | ||||
-rw-r--r-- | 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 c66ae53f9..74fd96c1a 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 0c24af25d..aabac7afa 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 48afb4e51..e5239b0c7 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; } |