X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FToolbar.cc;h=55beb59de8898204a18aea5194ea5e90a227ff5d;hb=351a06655bdd7d440780b5bc5b255081c888044b;hp=447e0d033e9c621cff7a94d2bbed5f319ea40e52;hpb=5377e3fde108da56894185716d47c3058032b97f;p=chaz%2Fopenbox diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 447e0d03..55beb59d 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -528,15 +528,20 @@ void Toolbar::updateStrut(void) { // left and right are always 0 strut.top = strut.bottom = 0; + // when hidden only one border is visible + unsigned int border_width = screen->getBorderWidth(); + if (! do_auto_hide) + border_width *= 2; + if (! screen->doHideToolbar()) { switch(placement) { case TopLeft: case TopCenter: case TopRight: - strut.top = getExposedHeight() + (screen->getBorderWidth() * 2); + strut.top = getExposedHeight() + border_width; break; default: - strut.bottom = getExposedHeight() + (screen->getBorderWidth() * 2); + strut.bottom = getExposedHeight() + border_width; } }