aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-01-20 18:24:55 (GMT)
committermarkt <markt>2007-01-20 18:24:55 (GMT)
commit9de41b30be9af1266860f6e3c76c4e85bfb9abc8 (patch)
treecca6530f4f71266e1bd24a70e3b99c3d6879ac64
parenta8e3f500c29c9d0c94233ce499e54fadd83fa764 (diff)
downloadfluxbox_paul-9de41b30be9af1266860f6e3c76c4e85bfb9abc8.zip
fluxbox_paul-9de41b30be9af1266860f6e3c76c4e85bfb9abc8.tar.bz2
minor changes for cascade placement
-rw-r--r--ChangeLog3
-rw-r--r--src/CascadePlacement.cc13
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b2735a..d95da39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/20:
4 * Don't place windows over toolbar at the top of the screen (Mark)
5 CascadePlacement.cc
3*07/01/16: 6*07/01/16:
4 * Make right-clicking on iconbar button behave the same way as tabs (Mark) 7 * Make right-clicking on iconbar button behave the same way as tabs (Mark)
5 IconButton.cc 8 IconButton.cc
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];