]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
new build system without automake
[chaz/openbox] / openbox / client.c
index 5881cac651341efeedaa93084d230e20662852a3..1df411e2090fae1c3a5303d2f1f1236b30ff0bac 100644 (file)
@@ -132,7 +132,6 @@ void client_manage_all()
 
         w = client_startup_stack_order[i-1];
         c = g_hash_table_lookup(client_map, &w);
-        g_message("0x%lx %d %d", c->window, c->iconic, c->shaded);
         if (c) stacking_lower(c);
     }
     g_free(client_startup_stack_order);
@@ -747,7 +746,8 @@ void client_setup_decor_and_functions(Client *self)
 {
     /* start with everything (cept fullscreen) */
     self->decorations = Decor_Titlebar | Decor_Handle | Decor_Border |
-       Decor_Icon | Decor_AllDesktops | Decor_Iconify | Decor_Maximize;
+       Decor_Icon | Decor_AllDesktops | Decor_Iconify | Decor_Maximize |
+        Decor_Shade;
     self->functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize |
        Func_Shade;
     if (self->delete_window) {
@@ -842,6 +842,8 @@ void client_setup_decor_and_functions(Client *self)
        self->decorations &= ~Decor_Maximize;
     if (self->disabled_decorations & Decor_AllDesktops)
        self->decorations &= ~Decor_AllDesktops;
+    if (self->disabled_decorations & Decor_Shade)
+       self->decorations &= ~Decor_Shade;
     if (self->disabled_decorations & Decor_Close)
        self->decorations &= ~Decor_Close;
 
@@ -1659,7 +1661,7 @@ void client_maximize(Client *self, gboolean max, int dir, gboolean savearea)
 
 void client_shade(Client *self, gboolean shade)
 {
-    if (!(self->functions & Func_Shade) || /* can't */
+    if ((!(self->functions & Func_Shade) && shade) || /* can't shade */
        self->shaded == shade) return;     /* already done */
 
     /* when we're iconic, don't change the wmstate */
This page took 0.02064 seconds and 4 git commands to generate.