summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-05-30 23:17:54 +0000
committerDana Jansens <danakj@orodu.net>2002-05-30 23:17:54 +0000
commite149ab6c299d96f0208b793b83f4c0d6f08a840f (patch)
treea9efa706cdda14fbcca538b2ba6ce12b8ddf630d /src
parent9ccebf111819c77108c179b906d824cb2a2a790d (diff)
no need to try the same screen edge twice for snapping when full max is on
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 840954ec..80fe0816 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2582,26 +2582,28 @@ void BlackboxWindow::motionNotifyEvent(XMotionEvent *me) {
else if (dbottom < snap_distance)
dy = srect.bottom() - frame.rect.height() + 1;
- srect = screen->getRect(); // now get the full screen
+ if (! screen->doFullMax()) {
+ srect = screen->getRect(); // now get the full screen
- dleft = std::abs(wleft - srect.left()),
- dright = std::abs(wright - srect.right()),
- dtop = std::abs(wtop - srect.top()),
- dbottom = std::abs(wbottom - srect.bottom());
+ dleft = std::abs(wleft - srect.left()),
+ dright = std::abs(wright - srect.right()),
+ dtop = std::abs(wtop - srect.top()),
+ dbottom = std::abs(wbottom - srect.bottom());
- // snap left?
- if (dleft < snap_distance && dleft <= dright)
- dx = srect.left();
- // snap right?
- else if (dright < snap_distance)
- dx = srect.right() - frame.rect.width() + 1;
+ // snap left?
+ if (dleft < snap_distance && dleft <= dright)
+ dx = srect.left();
+ // snap right?
+ else if (dright < snap_distance)
+ dx = srect.right() - frame.rect.width() + 1;
- // snap top?
- if (dtop < snap_distance && dtop <= dbottom)
- dy = srect.top();
- // snap bottom?
- else if (dbottom < snap_distance)
- dy = srect.bottom() - frame.rect.height() + 1;
+ // snap top?
+ if (dtop < snap_distance && dtop <= dbottom)
+ dy = srect.top();
+ // snap bottom?
+ else if (dbottom < snap_distance)
+ dy = srect.bottom() - frame.rect.height() + 1;
+ }
}
if (screen->doOpaqueMove()) {