From ebad1ce12f001e6be52825d48d6068af352068a1 Mon Sep 17 00:00:00 2001 From: mathias Date: Mon, 18 Apr 2005 15:27:59 +0000 Subject: 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 --- src/Window.cc | 6 ++++-- 1 file 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) { // we only care about the left/top etc that includes borders int borderW = 0; - if (decorationMask() & DECORM_ENABLED) + if (decorationMask() & (DECORM_ENABLED|DECORM_BORDER|DECORM_HANDLE)) borderW = frame().window().borderWidth(); int top = orig_top; // orig include the borders int left = orig_left; + int right = orig_left + width() + 2 * borderW; int bottom = orig_top + height() + 2 * borderW; @@ -3386,7 +3387,8 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { if ((*it) == this) continue; // skip myself - bw = (*it)->decorationMask() & DECORM_ENABLED ? (*it)->frame().window().borderWidth() : 0; + bw = (*it)->decorationMask() & (DECORM_ENABLED|DECORM_BORDER|DECORM_HANDLE) ? + (*it)->frame().window().borderWidth() : 0; snapToWindow(dx, dy, left, right, top, bottom, (*it)->x(), -- cgit v0.11.2