aboutsummaryrefslogtreecommitdiff
path: root/src/ScreenPlacement.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-05-17 18:27:59 (GMT)
committermarkt <markt>2007-05-17 18:27:59 (GMT)
commitd927862a8f09f8d10b7ff06e851c43d2a48e0fa6 (patch)
treeab0b4ca765bb62c10b70d59674030c789d385aba /src/ScreenPlacement.cc
parent30834f9f6e452db1346f5a76e217d88dce2a3580 (diff)
downloadfluxbox_pavel-d927862a8f09f8d10b7ff06e851c43d2a48e0fa6.zip
fluxbox_pavel-d927862a8f09f8d10b7ff06e851c43d2a48e0fa6.tar.bz2
fixed some window placement issues
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r--src/ScreenPlacement.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc
index 86c0804..4b52aa4 100644
--- a/src/ScreenPlacement.cc
+++ b/src/ScreenPlacement.cc
@@ -118,10 +118,11 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist
118 win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); 118 win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset();
119 119
120 // make sure the window is inside our screen(head) area 120 // make sure the window is inside our screen(head) area
121 if (place_x + win_w > head_right) 121 if (place_x + win_w - win.xOffset() > head_right)
122 place_x = (head_right - win_w) / 2 + win.xOffset(); 122 place_x = head_left + (head_right - head_left - win_w) / 2 +
123 if (place_y + win_h > head_bot) 123 win.xOffset();
124 place_y = (head_bot - win_h) / 2 + win.yOffset(); 124 if (place_y + win_h - win.yOffset() > head_bot)
125 place_y = head_top + (head_bot - head_top - win_h) / 2 + win.yOffset();
125 126
126 return true; 127 return true;
127} 128}