]> Dogcows Code - chaz/openbox/commitdiff
more resistance working. edge of screen works right now
authorDana Jansens <danakj@orodu.net>
Fri, 2 Aug 2002 16:54:08 +0000 (16:54 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 2 Aug 2002 16:54:08 +0000 (16:54 +0000)
src/Window.cc

index 99e19e4dadb4c2d245ef7dfe623375e9edc5bb6a..83f9fd0c28ff0e077c64d617347c53566111cdc1 100644 (file)
@@ -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?
This page took 0.025809 seconds and 4 git commands to generate.