aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-10-24 03:44:39 (GMT)
committermarkt <markt>2007-10-24 03:44:39 (GMT)
commitb504021145c9d79759c3809c4001ee2acdf4a5aa (patch)
tree8cf1dfa7beee656a075042682b6c600e4423be5c
parent42ace977752c4e2dc9e77794d0f9ac73c53437ef (diff)
downloadfluxbox_paul-b504021145c9d79759c3809c4001ee2acdf4a5aa.zip
fluxbox_paul-b504021145c9d79759c3809c4001ee2acdf4a5aa.tar.bz2
really fix placement when head is remembered but not position
-rw-r--r--src/CascadePlacement.cc2
-rw-r--r--src/ColSmartPlacement.cc2
-rw-r--r--src/MinOverlapPlacement.cc2
-rw-r--r--src/RowSmartPlacement.cc2
-rw-r--r--src/ScreenPlacement.cc2
-rw-r--r--src/UnderMousePlacement.cc2
-rw-r--r--src/Window.cc6
-rw-r--r--src/Window.hh1
8 files changed, 13 insertions, 6 deletions
diff --git a/src/CascadePlacement.cc b/src/CascadePlacement.cc
index 3d4eeef..bd20e66 100644
--- a/src/CascadePlacement.cc
+++ b/src/CascadePlacement.cc
@@ -46,7 +46,7 @@ bool CascadePlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist,
46 const FluxboxWindow &win, 46 const FluxboxWindow &win,
47 int &place_x, int &place_y) { 47 int &place_x, int &place_y) {
48 48
49 int head = (signed) win.screen().getCurrHead(); 49 int head = (signed) win.getOnHead();
50 int head_left = (signed) win.screen().maxLeft(head); 50 int head_left = (signed) win.screen().maxLeft(head);
51 int head_right = (signed) win.screen().maxRight(head); 51 int head_right = (signed) win.screen().maxRight(head);
52 int head_top = (signed) win.screen().maxTop(head); 52 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/ColSmartPlacement.cc b/src/ColSmartPlacement.cc
index 16c3b81..995a2f9 100644
--- a/src/ColSmartPlacement.cc
+++ b/src/ColSmartPlacement.cc
@@ -32,7 +32,7 @@ bool ColSmartPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist
32 int &place_x, int &place_y) { 32 int &place_x, int &place_y) {
33 33
34 // xinerama head constraints 34 // xinerama head constraints
35 int head = (signed) win.screen().getCurrHead(); 35 int head = (signed) win.getOnHead();
36 int head_left = (signed) win.screen().maxLeft(head); 36 int head_left = (signed) win.screen().maxLeft(head);
37 int head_right = (signed) win.screen().maxRight(head); 37 int head_right = (signed) win.screen().maxRight(head);
38 int head_top = (signed) win.screen().maxTop(head); 38 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/MinOverlapPlacement.cc b/src/MinOverlapPlacement.cc
index e7e80cb..68301c6 100644
--- a/src/MinOverlapPlacement.cc
+++ b/src/MinOverlapPlacement.cc
@@ -39,7 +39,7 @@ bool MinOverlapPlacement::placeWindow(
39 const FluxboxWindow &win, int &place_x, int &place_y) { 39 const FluxboxWindow &win, int &place_x, int &place_y) {
40 40
41 // view (screen + head) constraints 41 // view (screen + head) constraints
42 int head = (signed) win.screen().getCurrHead(); 42 int head = (signed) win.getOnHead();
43 int head_left = (signed) win.screen().maxLeft(head); 43 int head_left = (signed) win.screen().maxLeft(head);
44 int head_right = (signed) win.screen().maxRight(head); 44 int head_right = (signed) win.screen().maxRight(head);
45 int head_top = (signed) win.screen().maxTop(head); 45 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/RowSmartPlacement.cc b/src/RowSmartPlacement.cc
index e2a0be4..ec6078f 100644
--- a/src/RowSmartPlacement.cc
+++ b/src/RowSmartPlacement.cc
@@ -35,7 +35,7 @@ bool RowSmartPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist
35 int next_x, next_y; 35 int next_x, next_y;
36 36
37 // view (screen + head) constraints 37 // view (screen + head) constraints
38 int head = (signed) win.screen().getCurrHead(); 38 int head = (signed) win.getOnHead();
39 int head_left = (signed) win.screen().maxLeft(head); 39 int head_left = (signed) win.screen().maxLeft(head);
40 int head_right = (signed) win.screen().maxRight(head); 40 int head_right = (signed) win.screen().maxRight(head);
41 int head_top = (signed) win.screen().maxTop(head); 41 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc
index d614488..e8d1592 100644
--- a/src/ScreenPlacement.cc
+++ b/src/ScreenPlacement.cc
@@ -88,7 +88,7 @@ bool ScreenPlacement::placeWindow(const std::list<FluxboxWindow *> &windowlist,
88 } 88 }
89 89
90 // view (screen + head) constraints 90 // view (screen + head) constraints
91 int head = (signed) win.screen().getCurrHead(); 91 int head = (signed) win.getOnHead();
92 int head_left = (signed) win.screen().maxLeft(head); 92 int head_left = (signed) win.screen().maxLeft(head);
93 int head_right = (signed) win.screen().maxRight(head); 93 int head_right = (signed) win.screen().maxRight(head);
94 int head_top = (signed) win.screen().maxTop(head); 94 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/UnderMousePlacement.cc b/src/UnderMousePlacement.cc
index e601e77..c20e988 100644
--- a/src/UnderMousePlacement.cc
+++ b/src/UnderMousePlacement.cc
@@ -51,7 +51,7 @@ bool UnderMousePlacement::placeWindow(const std::list<FluxboxWindow *> &list,
51 int test_y = root_y - (win_h / 2); 51 int test_y = root_y - (win_h / 2);
52 52
53 // keep the window inside the screen 53 // keep the window inside the screen
54 int head = (signed) win.screen().getCurrHead(); 54 int head = (signed) win.getOnHead();
55 int head_left = (signed) win.screen().maxLeft(head); 55 int head_left = (signed) win.screen().maxLeft(head);
56 int head_right = (signed) win.screen().maxRight(head); 56 int head_right = (signed) win.screen().maxRight(head);
57 int head_top = (signed) win.screen().maxTop(head); 57 int head_top = (signed) win.screen().maxTop(head);
diff --git a/src/Window.cc b/src/Window.cc
index 51a7ee9..bd39855 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -480,6 +480,8 @@ void FluxboxWindow::init() {
480 real_y <= (signed) screen().height()) 480 real_y <= (signed) screen().height())
481 m_placed = true; 481 m_placed = true;
482 482
483 } else if (!m_placed) {
484 setOnHead(screen().getCurrHead());
483 } 485 }
484/* 486/*
485 if (wattrib.width <= 0) 487 if (wattrib.width <= 0)
@@ -4096,6 +4098,10 @@ int FluxboxWindow::getDecoMaskFromString(const string &str_label) {
4096 return mask; 4098 return mask;
4097} 4099}
4098 4100
4101int FluxboxWindow::getOnHead() const {
4102 return screen().getHead(fbWindow());
4103}
4104
4099void FluxboxWindow::setOnHead(int head) { 4105void FluxboxWindow::setOnHead(int head) {
4100 if (head > 0 && head <= screen().numHeads()) { 4106 if (head > 0 && head <= screen().numHeads()) {
4101 int cur = screen().getHead(fbWindow()); 4107 int cur = screen().getHead(fbWindow());
diff --git a/src/Window.hh b/src/Window.hh
index cf0077e..b5c5dd2 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -306,6 +306,7 @@ public:
306 void lowerLayer(); 306 void lowerLayer();
307 /// moves the window to a new layer 307 /// moves the window to a new layer
308 void moveToLayer(int layernum, bool force = false); 308 void moveToLayer(int layernum, bool force = false);
309 int getOnHead() const;
309 void setOnHead(int head); 310 void setOnHead(int head);
310 /// sets the window focus hidden state 311 /// sets the window focus hidden state
311 void setFocusHidden(bool value); 312 void setFocusHidden(bool value);