diff options
Diffstat (limited to 'src/ScreenPlacement.cc')
-rw-r--r-- | src/ScreenPlacement.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc index fb79d88..85f2487 100644 --- a/src/ScreenPlacement.cc +++ b/src/ScreenPlacement.cc | |||
@@ -123,10 +123,11 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, | |||
123 | win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); | 123 | win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset(); |
124 | 124 | ||
125 | // make sure the window is inside our screen(head) area | 125 | // make sure the window is inside our screen(head) area |
126 | if (place_x + win_w > head_right) | 126 | if (place_x + win_w - win.xOffset() > head_right) |
127 | place_x = (head_right - win_w) / 2 + win.xOffset(); | 127 | place_x = head_left + (head_right - head_left - win_w) / 2 + |
128 | if (place_y + win_h > head_bot) | 128 | win.xOffset(); |
129 | place_y = (head_bot - win_h) / 2 + win.yOffset(); | 129 | if (place_y + win_h - win.yOffset() > head_bot) |
130 | place_y = head_top + (head_bot - head_top - win_h) / 2 + win.yOffset(); | ||
130 | 131 | ||
131 | return true; | 132 | return true; |
132 | } | 133 | } |