aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CascadePlacement.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/CascadePlacement.cc b/src/CascadePlacement.cc
index 4cad9d0..e2993d2 100644
--- a/src/CascadePlacement.cc
+++ b/src/CascadePlacement.cc
@@ -31,8 +31,8 @@ CascadePlacement::CascadePlacement(const BScreen &screen) {
31 m_cascade_x = new int[screen.numHeads() + 1]; 31 m_cascade_x = new int[screen.numHeads() + 1];
32 m_cascade_y = new int[screen.numHeads() + 1]; 32 m_cascade_y = new int[screen.numHeads() + 1];
33 for (int i=0; i < screen.numHeads() + 1; i++) { 33 for (int i=0; i < screen.numHeads() + 1; i++) {
34 m_cascade_x[i] = 32 + screen.getHeadX(i); 34 m_cascade_x[i] = 32 + screen.maxLeft(i);
35 m_cascade_y[i] = 32 + screen.getHeadY(i); 35 m_cascade_y[i] = 32 + screen.maxTop(i);
36 } 36 }
37 37
38} 38}
@@ -52,11 +52,10 @@ bool CascadePlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlis
52 int head_top = (signed) win.screen().maxTop(head); 52 int head_top = (signed) win.screen().maxTop(head);
53 int head_bot = (signed) win.screen().maxBottom(head); 53 int head_bot = (signed) win.screen().maxBottom(head);
54 54
55 if ((m_cascade_x[head] > ((head_left + head_right) / 2)) || 55 if (m_cascade_x[head] > ((head_left + head_right) / 2))
56 (m_cascade_y[head] > ((head_top + head_bot) / 2))) { 56 m_cascade_x[head] = head_left;
57 m_cascade_x[head] = head_left + 32; 57 if (m_cascade_y[head] > ((head_top + head_bot) / 2))
58 m_cascade_y[head] = head_top + 32; 58 m_cascade_y[head] = head_top;
59 }
60 59
61 place_x = m_cascade_x[head]; 60 place_x = m_cascade_x[head];
62 place_y = m_cascade_y[head]; 61 place_y = m_cascade_y[head];