summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index e7d8476..0e2e72e 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3273,23 +3273,39 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
3273 ///////////////////////////////////// 3273 /////////////////////////////////////
3274 // begin by checking the screen (or Xinerama head) edges 3274 // begin by checking the screen (or Xinerama head) edges
3275 3275
3276 int h;
3276 if (screen().numHeads() > 0) { 3277 if (screen().numHeads() > 0) {
3277 // head "0" == whole screen width + height, which we skip since the 3278 // head "0" == whole screen width + height, which we skip since the
3278 // sum of all the heads covers those edges 3279 // sum of all the heads covers those edges
3279 for (int h = 1; h <= screen().numHeads(); h++) { 3280 for (h = 1; h <= screen().numHeads(); h++) {
3280 snapToWindow(dx, dy, left, right, top, bottom, 3281 snapToWindow(dx, dy, left, right, top, bottom,
3281 screen().maxLeft(h), 3282 screen().maxLeft(h),
3282 screen().maxRight(h), 3283 screen().maxRight(h),
3283 screen().maxTop(h), 3284 screen().maxTop(h),
3284 screen().maxBottom(h)); 3285 screen().maxBottom(h));
3285 } 3286 }
3287 for (h = 1; h <= screen().numHeads(); h++) {
3288 snapToWindow(dx, dy, left, right, top, bottom,
3289 screen().getHeadX(h),
3290 screen().getHeadX(h) + screen().getHeadWidth(h),
3291 screen().getHeadY(h),
3292 screen().getHeadY(h) + screen().getHeadHeight(h));
3293 }
3286 } else { 3294 } else {
3287 snapToWindow(dx, dy, left, right, top, bottom, 3295 snapToWindow(dx, dy, left, right, top, bottom,
3288 screen().maxLeft(0), 3296 screen().maxLeft(0),
3289 screen().maxRight(0), 3297 screen().maxRight(0),
3290 screen().maxTop(0), 3298 screen().maxTop(0),
3291 screen().maxBottom(0)); 3299 screen().maxBottom(0));
3300
3301 snapToWindow(dx, dy, left, right, top, bottom,
3302 screen().getHeadX(0),
3303 screen().getHeadX(0) + screen().getHeadWidth(0),
3304 screen().getHeadY(0),
3305 screen().getHeadY(0) + screen().getHeadHeight(0));
3292 } 3306 }
3307
3308
3293 ///////////////////////////////////// 3309 /////////////////////////////////////
3294 // now check window edges 3310 // now check window edges
3295 3311
@@ -3301,7 +3317,9 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
3301 3317
3302 unsigned int bw; 3318 unsigned int bw;
3303 for (; it != it_end; it++) { 3319 for (; it != it_end; it++) {
3304 if ((*it) == this) continue; // skip myself 3320 if ((*it) == this)
3321 continue; // skip myself
3322
3305 bw = (*it)->decorationMask() & DECORM_ENABLED ? (*it)->frame().window().borderWidth() : 0; 3323 bw = (*it)->decorationMask() & DECORM_ENABLED ? (*it)->frame().window().borderWidth() : 0;
3306 3324
3307 snapToWindow(dx, dy, left, right, top, bottom, 3325 snapToWindow(dx, dy, left, right, top, bottom,