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
This commit is contained in:
parent
1c2ec09e43
commit
be71b344fa
1 changed files with 14 additions and 8 deletions
|
@ -249,8 +249,10 @@ void dock_configure(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dock->area.width += l + r;
|
if (dock->dock_apps) {
|
||||||
dock->area.height += t + b;
|
dock->area.width += l + r;
|
||||||
|
dock->area.height += t + b;
|
||||||
|
}
|
||||||
|
|
||||||
hspot = l;
|
hspot = l;
|
||||||
vspot = t;
|
vspot = t;
|
||||||
|
@ -427,11 +429,12 @@ void dock_configure(void)
|
||||||
if (!dock->dock_apps) {
|
if (!dock->dock_apps) {
|
||||||
STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0,
|
STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 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,
|
STRUT_PARTIAL_SET(dock_strut, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0);
|
0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
switch (config_dock_pos) {
|
switch (config_dock_pos) {
|
||||||
case OB_DIRECTION_NORTHWEST:
|
case OB_DIRECTION_NORTHWEST:
|
||||||
switch (config_dock_orient) {
|
switch (config_dock_orient) {
|
||||||
|
@ -529,9 +532,12 @@ void dock_configure(void)
|
||||||
} else
|
} else
|
||||||
XUnmapWindow(ob_display, dock->frame);
|
XUnmapWindow(ob_display, dock->frame);
|
||||||
|
|
||||||
/* but they are useful outside of this function! */
|
/* but they are useful outside of this function! but don't add it if the
|
||||||
dock->area.width += ob_rr_theme->obwidth * 2;
|
dock is actually not visible */
|
||||||
dock->area.height += ob_rr_theme->obwidth * 2;
|
if (dock->dock_apps) {
|
||||||
|
dock->area.width += ob_rr_theme->obwidth * 2;
|
||||||
|
dock->area.height += ob_rr_theme->obwidth * 2;
|
||||||
|
}
|
||||||
|
|
||||||
screen_update_areas();
|
screen_update_areas();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue