]> Dogcows Code - chaz/openbox/commitdiff
only add borders and stuff to the dock's size if it is holding anything. otherwise...
authorDana Jansens <danakj@orodu.net>
Sat, 26 Jan 2008 06:17:56 +0000 (01:17 -0500)
committerDana Jansens <danakj@orodu.net>
Sat, 26 Jan 2008 06:17:56 +0000 (01:17 -0500)
openbox/dock.c

index ed8bed4be43a1822c2b30dea86c7221a28621c6d..4c183e2c755f11793b94f5f1a3cbc38dcbc6a512 100644 (file)
@@ -249,8 +249,10 @@ void dock_configure(void)
         }
     }
 
-    dock->area.width += l + r;
-    dock->area.height += t + b;
+    if (dock->dock_apps) {
+        dock->area.width += l + r;
+        dock->area.height += t + b;
+    }
 
     hspot = l;
     vspot = t;
@@ -427,11 +429,12 @@ void dock_configure(void)
     if (!dock->dock_apps) {
         STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0,
                           0, 0, 0, 0, 0, 0, 0, 0);
-    } else if (config_dock_floating || config_dock_nostrut)
-    {
+    }
+    else if (config_dock_floating || config_dock_nostrut) {
         STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0,
                           0, 0, 0, 0, 0, 0, 0, 0);
-    } else {
+    }
+    else {
         switch (config_dock_pos) {
         case OB_DIRECTION_NORTHWEST:
             switch (config_dock_orient) {
@@ -529,9 +532,12 @@ void dock_configure(void)
     } else
         XUnmapWindow(ob_display, dock->frame);
 
-    /* but they are useful outside of this function! */
-    dock->area.width += ob_rr_theme->obwidth * 2;
-    dock->area.height += ob_rr_theme->obwidth * 2;
+    /* but they are useful outside of this function! but don't add it if the
+       dock is actually not visible */
+    if (dock->dock_apps) {
+        dock->area.width += ob_rr_theme->obwidth * 2;
+        dock->area.height += ob_rr_theme->obwidth * 2;
+    }
 
     screen_update_areas();
 
This page took 0.023793 seconds and 4 git commands to generate.