JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Kill some braces and shorten code a bit
authorMarco Peereboom <marco@conformal.com>
Mon, 19 Jan 2009 03:30:39 +0000 (03:30 +0000)
committerMarco Peereboom <marco@conformal.com>
Mon, 19 Jan 2009 03:30:39 +0000 (03:30 +0000)
scrotwm.c

index 6ee2f9e..8d746c2 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -365,13 +365,11 @@ bar_toggle(union arg *args)
 
        DNPRINTF(SWM_D_MISC, "bar_toggle\n");
 
-       if (bar_enabled) {
-               bar_enabled = 0;
+       if (bar_enabled)
                XUnmapWindow(display, bar_window);
-       } else {
-               bar_enabled = 1;
+       else
                XMapRaised(display, bar_window);
-       }
+       bar_enabled = !bar_enabled;
        XSync(display, False);
        for (i = 0; i < SWM_WS_MAX; i++)
                ws[i].restack = 1;
@@ -399,9 +397,8 @@ bar_setup(void)
        bar_gc = XCreateGC(display, bar_window, 0, &bar_gcv);
        XSetFont(display, bar_gc, bar_fs->fid);
        XSelectInput(display, bar_window, VisibilityChangeMask);
-       if (bar_enabled) {
+       if (bar_enabled)
                XMapRaised(display, bar_window);
-       }
        DNPRINTF(SWM_D_MISC, "bar_setup: bar_window %d\n", (int)bar_window);
 
        if (signal(SIGALRM, bar_signal) == SIG_ERR)