summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-26 01:17:56 -0500
committerDana Jansens <danakj@orodu.net>2008-01-26 01:17:56 -0500
commitbe71b344fa740cfa061fea81426583ff44aeee9b (patch)
treec080d4e3d68575c5de3d633634347dc36f6960a4
parent1c2ec09e43b09554c10dd53fc750e975eaa8719c (diff)
only add borders and stuff to the dock's size if it is holding anything. otherwise it gets a non-zero size which messes with resistence/placement/etc
-rw-r--r--openbox/dock.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/openbox/dock.c b/openbox/dock.c
index ed8bed4b..4c183e2c 100644
--- a/openbox/dock.c
+++ b/openbox/dock.c
@@ -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();