aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathias <mathias>2005-04-18 15:27:59 (GMT)
committermathias <mathias>2005-04-18 15:27:59 (GMT)
commitebad1ce12f001e6be52825d48d6068af352068a1 (patch)
tree8d104937e7d4785c506f503e60a05bbe65d918b0 /src
parent6c1288b6f5f5c6d41e947053ba09ab617d206934 (diff)
downloadfluxbox_pavel-ebad1ce12f001e6be52825d48d6068af352068a1.zip
fluxbox_pavel-ebad1ce12f001e6be52825d48d6068af352068a1.tar.bz2
fixes a little bug with snapping to windows which have a border only.
such windows dont have DECORM_ENABLED and hence no borderwidth was added to the calculation. thats fixed now
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index ea04d9c..49c5f29 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3328,11 +3328,12 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
3328 // we only care about the left/top etc that includes borders 3328 // we only care about the left/top etc that includes borders
3329 int borderW = 0; 3329 int borderW = 0;
3330 3330
3331 if (decorationMask() & DECORM_ENABLED) 3331 if (decorationMask() & (DECORM_ENABLED|DECORM_BORDER|DECORM_HANDLE))
3332 borderW = frame().window().borderWidth(); 3332 borderW = frame().window().borderWidth();
3333 3333
3334 int top = orig_top; // orig include the borders 3334 int top = orig_top; // orig include the borders
3335 int left = orig_left; 3335 int left = orig_left;
3336
3336 int right = orig_left + width() + 2 * borderW; 3337 int right = orig_left + width() + 2 * borderW;
3337 int bottom = orig_top + height() + 2 * borderW; 3338 int bottom = orig_top + height() + 2 * borderW;
3338 3339
@@ -3386,7 +3387,8 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
3386 if ((*it) == this) 3387 if ((*it) == this)
3387 continue; // skip myself 3388 continue; // skip myself
3388 3389
3389 bw = (*it)->decorationMask() & DECORM_ENABLED ? (*it)->frame().window().borderWidth() : 0; 3390 bw = (*it)->decorationMask() & (DECORM_ENABLED|DECORM_BORDER|DECORM_HANDLE) ?
3391 (*it)->frame().window().borderWidth() : 0;
3390 3392
3391 snapToWindow(dx, dy, left, right, top, bottom, 3393 snapToWindow(dx, dy, left, right, top, bottom,
3392 (*it)->x(), 3394 (*it)->x(),