diff options
author | markt <markt> | 2007-01-20 18:24:55 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-20 18:24:55 (GMT) |
commit | 9de41b30be9af1266860f6e3c76c4e85bfb9abc8 (patch) | |
tree | cca6530f4f71266e1bd24a70e3b99c3d6879ac64 /src | |
parent | a8e3f500c29c9d0c94233ce499e54fadd83fa764 (diff) | |
download | fluxbox-9de41b30be9af1266860f6e3c76c4e85bfb9abc8.zip fluxbox-9de41b30be9af1266860f6e3c76c4e85bfb9abc8.tar.bz2 |
minor changes for cascade placement
Diffstat (limited to 'src')
-rw-r--r-- | src/CascadePlacement.cc | 13 |
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]; |