aboutsummaryrefslogtreecommitdiff
path: root/src/CascadePlacement.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CascadePlacement.cc')
-rw-r--r--src/CascadePlacement.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/CascadePlacement.cc b/src/CascadePlacement.cc
index bd20e66..10b23b0 100644
--- a/src/CascadePlacement.cc
+++ b/src/CascadePlacement.cc
@@ -27,14 +27,12 @@
27#include "Screen.hh" 27#include "Screen.hh"
28 28
29CascadePlacement::CascadePlacement(const BScreen &screen) { 29CascadePlacement::CascadePlacement(const BScreen &screen) {
30 // +1 ?
31 m_cascade_x = new int[screen.numHeads() + 1]; 30 m_cascade_x = new int[screen.numHeads() + 1];
32 m_cascade_y = new int[screen.numHeads() + 1]; 31 m_cascade_y = new int[screen.numHeads() + 1];
33 for (int i=0; i < screen.numHeads() + 1; i++) { 32 for (int i=0; i < screen.numHeads() + 1; i++) {
34 m_cascade_x[i] = 32 + screen.maxLeft(i); 33 m_cascade_x[i] = screen.maxRight(i);
35 m_cascade_y[i] = 32 + screen.maxTop(i); 34 m_cascade_y[i] = screen.maxBottom(i);
36 } 35 }
37
38} 36}
39 37
40CascadePlacement::~CascadePlacement() { 38CascadePlacement::~CascadePlacement() {
@@ -42,11 +40,9 @@ CascadePlacement::~CascadePlacement() {
42 delete [] m_cascade_y; 40 delete [] m_cascade_y;
43} 41}
44 42
45bool CascadePlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist, 43bool CascadePlacement::placeWindow(const FluxboxWindow &win, int head,
46 const FluxboxWindow &win,
47 int &place_x, int &place_y) { 44 int &place_x, int &place_y) {
48 45
49 int head = (signed) win.getOnHead();
50 int head_left = (signed) win.screen().maxLeft(head); 46 int head_left = (signed) win.screen().maxLeft(head);
51 int head_right = (signed) win.screen().maxRight(head); 47 int head_right = (signed) win.screen().maxRight(head);
52 int head_top = (signed) win.screen().maxTop(head); 48 int head_top = (signed) win.screen().maxTop(head);