diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-06-21 01:06:29 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-06-21 01:06:29 +0000 |
| commit | 1766453ca2ce30adf84798cb504e8b4d258bd08f (patch) | |
| tree | 0f667ab5a3f22293926965086258f98e09e42c46 /src/Slit.cc | |
| parent | 8941da8e41d15ae6729c04b2933d74869c25e857 (diff) | |
sync with blackbox-cvs
Diffstat (limited to 'src/Slit.cc')
| -rw-r--r-- | src/Slit.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Slit.cc b/src/Slit.cc index 83923dfc..171432af 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -433,25 +433,29 @@ void Slit::updateStrut(void) { strut.top = strut.bottom = strut.left = strut.right = 0; if (! clientList.empty()) { + // when not hidden both borders are in use, when hidden only one is + unsigned int border_width = screen->getBorderWidth(); + if (! do_auto_hide) + border_width *= 2; + switch (direction) { case Vertical: switch (placement) { case TopCenter: - strut.top = getY() + getExposedHeight() + - (screen->getBorderWidth() * 2); + strut.top = getExposedHeight() + border_width; break; case BottomCenter: - strut.bottom = screen->getHeight() - getY(); + strut.bottom = getExposedHeight() + border_width; break; case TopLeft: case CenterLeft: case BottomLeft: - strut.left = getExposedWidth() + (screen->getBorderWidth() * 2); + strut.left = getExposedWidth() + border_width; break; case TopRight: case CenterRight: case BottomRight: - strut.right = getExposedWidth() + (screen->getBorderWidth() * 2); + strut.right = getExposedWidth() + border_width; break; } break; @@ -460,19 +464,18 @@ void Slit::updateStrut(void) { case TopCenter: case TopLeft: case TopRight: - strut.top = getY() + getExposedHeight() + - (screen->getBorderWidth() * 2); + strut.top = getExposedHeight() + border_width; break; case BottomCenter: case BottomLeft: case BottomRight: - strut.bottom = screen->getHeight() - getY(); + strut.bottom = getExposedHeight() + border_width; break; case CenterLeft: - strut.left = getExposedWidth() + (screen->getBorderWidth() * 2); + strut.left = getExposedWidth() + border_width; break; case CenterRight: - strut.right = getExposedWidth() + (screen->getBorderWidth() * 2); + strut.right = getExposedWidth() + border_width; break; } break; |
