From 578a5cc980dd39430fe803a4ca9719075e78e986 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 27 Jun 2002 17:54:32 +0000 Subject: make fully max'd windows properly snap --- src/Window.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Window.cc') 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; } -- cgit v1.2.3