X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=7c5b823bc2df3587cf0ac0bee9500d2636590b60;hb=871602208a1874dcb3a8bfc4abdfc4d100a0ec57;hp=99db605c5c7ff7b3710e3c5b1b8dc34d58a30832;hpb=b2e9af88862bc2c084c542fdf5cbfb5049cca1fd;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 99db605c..7c5b823b 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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; }