From: Dana Jansens Date: Fri, 2 Aug 2002 16:54:08 +0000 (+0000) Subject: more resistance working. edge of screen works right now X-Git-Tag: openbox-2_0_0~107 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=c2b3dc9f7129d99e4fca9491ef0bd92be4e8af62;p=dana%2Fopenbox.git more resistance working. edge of screen works right now --- diff --git a/src/Window.cc b/src/Window.cc index 99e19e4d..83f9fd0c 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3224,13 +3224,17 @@ void BlackboxWindow::doMove(int x_root, int y_root) { const Rect &srect = *it; // if we're not in the rectangle then don't snap to it. - if (! srect.intersects(Rect(wleft, wtop, frame.rect.width(), - frame.rect.height()))) - continue; + if (screen->doOpaqueMove()) { + if (! srect.contains(frame.rect)) + continue; + } else { + if (! srect.contains(frame.changing)) + continue; + } - int dleft = wleft - srect.left(), + int dleft = srect.left() - wleft, dright = wright - srect.right(), - dtop = wtop - srect.top(), + dtop = srect.top() - wtop, dbottom = wbottom - srect.bottom(); // snap left?