From e7cf5cbe3cefaf429dd2370d47429c8161858993 Mon Sep 17 00:00:00 2001 From: mathias Date: Mon, 18 Apr 2005 16:05:26 +0000 Subject: fixes a problem with snapping to the slit. slit's borderwith wasnt part of the strut. --- src/Slit.cc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/Slit.cc b/src/Slit.cc index ea70e6b..9221377 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -359,52 +359,53 @@ void Slit::updateStrut() { return; } - + unsigned int bw = m_slit_theme->borderWidth(); int left = 0, right = 0, top = 0, bottom = 0; switch (placement()) { case TOPLEFT: if (direction() == HORIZONTAL) - top = height(); + top = height() + 2 * bw; else - left = width(); + left = width() + 2 * bw; break; case TOPCENTER: if (direction() == HORIZONTAL) - top = height(); + top = height() + 2 * bw; break; case TOPRIGHT: if (direction() == HORIZONTAL) - top = height(); + top = height() + 2 * bw; else - right = width(); + right = width() + 2 * bw; break; case BOTTOMLEFT: if (direction() == HORIZONTAL) - bottom = height(); + bottom = height() + 2 * bw; else - left = width(); + left = width() + 2 * bw; break; case BOTTOMCENTER: // would be strange to have it request size on vertical direction // each time we add a client if (direction() == HORIZONTAL) - bottom = height(); + bottom = height() + 2 * bw; break; case BOTTOMRIGHT: if (direction() == HORIZONTAL) - bottom = height(); + bottom = height() + 2 * bw; else - right = width(); + right = width() + 2 * bw; break; case LEFTCENTER: if (direction() == VERTICAL) - left = width(); + left = width() + 2 * bw; break; case RIGHTCENTER: if (direction() == VERTICAL) - right = width(); + right = width() + 2 * bw; break; } + m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom); screen().updateAvailableWorkspaceArea(); } -- cgit v0.11.2