]> code.delx.au - spectrwm/commitdiff
Clear status-bar when iconifying the last window.
authorTiago Cunha <tcunha@gmx.com>
Wed, 8 Feb 2012 01:07:46 +0000 (01:07 +0000)
committerTiago Cunha <tcunha@gmx.com>
Wed, 8 Feb 2012 22:36:53 +0000 (22:36 +0000)
Make the focus_magic function responsible for updating the status-bar
output when there is no window available. Now, any window related output
gets cleared when iconifying the last available window.

scrotwm.c

index cba3e36ae859f1c75d695c488a9037ab7faba559..6c9b2db6d906d964b2c77dca1b6df4ac943c7074 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -5998,8 +5998,11 @@ focus_magic(struct ws_win *win)
 {
        DNPRINTF(SWM_D_FOCUS, "focus_magic: window: 0x%lx\n", WINID(win));
 
-       if (win == NULL)
+       if (win == NULL) {
+               /* if there are no windows clear the status-bar */
+               bar_check_opts();
                return;
+       }
 
        if (win->child_trans) {
                /* win = parent & has a transient so focus on that */