]> code.delx.au - spectrwm/commitdiff
Don't call the status-bar wrapper function.
authorTiago Cunha <tcunha@gmx.com>
Sat, 12 May 2012 21:05:21 +0000 (22:05 +0100)
committerTiago Cunha <tcunha@gmx.com>
Tue, 5 Jun 2012 21:30:06 +0000 (22:30 +0100)
The update functions already check if the window related enabled options
are set. Just call it directly, instead. As a consequence, the wrapper
function can now be deleted.

spectrwm.c

index 796153b47edfa3db573b016ad62abfcf9b179884..038b1b00ce9413c55c228cf0563fdfb0e3587f0e 100644 (file)
@@ -1499,13 +1499,6 @@ bar_update(void)
        alarm(bar_delay);
 }
 
-void
-bar_check_opts(void)
-{
-       if (title_class_enabled || title_name_enabled || window_name_enabled)
-               bar_update();
-}
-
 void
 bar_signal(int sig)
 {
@@ -2237,7 +2230,7 @@ focus_win(struct ws_win *win)
                    PropModeReplace, (unsigned char *)&win->id, 1);
        }
 
-       bar_check_opts();
+       bar_update();
 }
 
 void
@@ -6196,7 +6189,7 @@ focus_magic(struct ws_win *win)
 
        if (win == NULL) {
                /* if there are no windows clear the status-bar */
-               bar_check_opts();
+               bar_update();
                return;
        }
 
@@ -6609,12 +6602,8 @@ propertynotify(XEvent *e)
                    X(win), Y(win), WIDTH(win), HEIGHT(win));
 #endif
        case XA_WM_CLASS:
-               if (title_name_enabled || title_class_enabled)
-                       bar_update();
-               break;
        case XA_WM_NAME:
-               if (window_name_enabled)
-                       bar_update();
+               bar_update();
                break;
        default:
                break;