]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
make desktop windows get lowered properly
[chaz/openbox] / src / Window.cc
index 99db605c5c7ff7b3710e3c5b1b8dc34d58a30832..7c5b823bc2df3587cf0ac0bee9500d2636590b60 100644 (file)
@@ -2891,17 +2891,17 @@ void BlackboxWindow::doMove(int x_root, int y_root) {
       dbottom = std::abs(wbottom - srect.bottom());
 
     // snap left?
-    if (dleft < snap_distance && dleft < dright)
+    if (dleft < snap_distance && dleft <= dright)
       dx = srect.left();
     // snap right?
-    else if (dright < snap_distance && dright < dleft)
+    else if (dright < snap_distance)
       dx = srect.right() - frame.rect.width() + 1;
 
     // snap top?
-    if (dtop < snap_distance && dtop < dbottom)
+    if (dtop < snap_distance && dtop <= dbottom)
       dy = srect.top();
     // snap bottom?
-    else if (dbottom < snap_distance && dbottom < dtop)
+    else if (dbottom < snap_distance)
       dy = srect.bottom() - frame.rect.height() + 1;
 
     srect = screen->getRect(); // now get the full screen
@@ -2912,17 +2912,17 @@ void BlackboxWindow::doMove(int x_root, int y_root) {
       dbottom = std::abs(wbottom - srect.bottom());
 
     // snap left?
-    if (dleft < snap_distance && dleft < dright)
+    if (dleft < snap_distance && dleft <= dright)
       dx = srect.left();
     // snap right?
-    else if (dright < snap_distance && dright < dleft)
+    else if (dright < snap_distance)
       dx = srect.right() - frame.rect.width() + 1;
 
     // snap top?
-    if (dtop < snap_distance && dtop < dbottom)
+    if (dtop < snap_distance && dtop <= dbottom)
       dy = srect.top();
     // snap bottom?
-    else if (dbottom < snap_distance && dbottom < dtop)
+    else if (dbottom < snap_distance)
       dy = srect.bottom() - frame.rect.height() + 1;
   }
 
This page took 0.025524 seconds and 4 git commands to generate.