summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.hh4
-rw-r--r--src/Toolbar.cc8
-rw-r--r--src/Window.cc22
3 files changed, 25 insertions, 9 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index ad18f63..e0fe5da 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -464,11 +464,9 @@ private:
464 const std::string m_name, m_altname; 464 const std::string m_name, m_altname;
465 FbTk::ResourceManager &m_resource_manager; 465 FbTk::ResourceManager &m_resource_manager;
466 466
467 // Xinerama related private data
467 bool m_xinerama_avail; 468 bool m_xinerama_avail;
468 int m_xinerama_num_heads; 469 int m_xinerama_num_heads;
469
470 // Xinerama related private data
471
472 int m_xinerama_center_x, m_xinerama_center_y; 470 int m_xinerama_center_x, m_xinerama_center_y;
473 471
474 HeadArea *m_head_areas; 472 HeadArea *m_head_areas;
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index b2566b3..db0c4b8 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -314,22 +314,22 @@ void Toolbar::updateStrut() {
314 case TOPLEFT: 314 case TOPLEFT:
315 case TOPCENTER: 315 case TOPCENTER:
316 case TOPRIGHT: 316 case TOPRIGHT:
317 top = height(); 317 top = height() + 2 * theme().border().width();
318 break; 318 break;
319 case BOTTOMLEFT: 319 case BOTTOMLEFT:
320 case BOTTOMCENTER: 320 case BOTTOMCENTER:
321 case BOTTOMRIGHT: 321 case BOTTOMRIGHT:
322 bottom = height(); 322 bottom = height() + 2 * theme().border().width();
323 break; 323 break;
324 case RIGHTTOP: 324 case RIGHTTOP:
325 case RIGHTCENTER: 325 case RIGHTCENTER:
326 case RIGHTBOTTOM: 326 case RIGHTBOTTOM:
327 right = width(); 327 right = width() + 2 * theme().border().width();
328 break; 328 break;
329 case LEFTTOP: 329 case LEFTTOP:
330 case LEFTCENTER: 330 case LEFTCENTER:
331 case LEFTBOTTOM: 331 case LEFTBOTTOM:
332 left = width(); 332 left = width() + 2 * theme().border().width();
333 break; 333 break;
334 }; 334 };
335 m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom); 335 m_strut = screen().requestStrut(getOnHead(), left, right, top, bottom);
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,