Code

screen_{file,artist,search}: repaint only if screen is visible
authorMax Kellermann <max@duempel.org>
Tue, 18 Nov 2008 20:51:40 +0000 (21:51 +0100)
committerMax Kellermann <max@duempel.org>
Tue, 18 Nov 2008 20:51:40 +0000 (21:51 +0100)
Don't repaint the screen after browser_cmd() if another screen has
been selected meanwhile.

src/screen_artist.c
src/screen_file.c
src/screen_search.c

index c66ae53f99ed62595e3e5b512d96453e949c0b7c..74fd96c1aed9a755543d07d7f2fb6b27d89d5855 100644 (file)
@@ -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;
        }
 
index 0c24af25d4df9ad16a7f476152215bdecb1a7f7a..aabac7afa9cc1da019dd3124f27a4eea74e6c574 100644 (file)
@@ -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;
        }
 
index 48afb4e51804a0991a4f01c5a836e5f011ced575..e5239b0c74b97ce24c033fc5b887f642ec013174 100644 (file)
@@ -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;
        }