aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/ColSmartPlacement.cc6
-rw-r--r--src/RowSmartPlacement.cc4
-rw-r--r--src/ScreenPlacement.cc7
4 files changed, 12 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index a9f1a82..6a5919e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.16: 2Changes for 0.9.16:
3*06/03/20: 3*06/03/20:
4 * Fix placement config (some compilers resulted in ignoring of
5 placement policy setting), and a minor ext. tabs placement bug
6 ScreenPlacement.cc Row/ColSmartPlacement.cc
4 * External tabs (Simon) 7 * External tabs (Simon)
5 - option in Configure menu to enable 8 - option in Configure menu to enable
6 - restart require at present when toggling this option 9 - restart require at present when toggling this option
diff --git a/src/ColSmartPlacement.cc b/src/ColSmartPlacement.cc
index 5b84168..cb3fbd9 100644
--- a/src/ColSmartPlacement.cc
+++ b/src/ColSmartPlacement.cc
@@ -66,7 +66,7 @@ bool ColSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
66 while (!placed && 66 while (!placed &&
67 (left_right ? test_x + win_w <= head_right 67 (left_right ? test_x + win_w <= head_right
68 : test_x >= head_left)) { 68 : test_x >= head_left)) {
69 69
70 if (left_right) 70 if (left_right)
71 next_x = head_right; // it will get shrunk 71 next_x = head_right; // it will get shrunk
72 else 72 else
@@ -90,8 +90,8 @@ bool ColSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
90 std::vector<FluxboxWindow *>::const_iterator it_end = 90 std::vector<FluxboxWindow *>::const_iterator it_end =
91 windowlist.end(); 91 windowlist.end();
92 for (; it != it_end && placed; ++it) { 92 for (; it != it_end && placed; ++it) {
93 int curr_x = (*it)->x() + (*it)->xOffset(); 93 int curr_x = (*it)->x() - (*it)->xOffset();
94 int curr_y = (*it)->y() + (*it)->yOffset(); 94 int curr_y = (*it)->y() - (*it)->yOffset();
95 int curr_w = (*it)->width() + (*it)->fbWindow().borderWidth()*2 + (*it)->widthOffset(); 95 int curr_w = (*it)->width() + (*it)->fbWindow().borderWidth()*2 + (*it)->widthOffset();
96 int curr_h = (*it)->height() + (*it)->fbWindow().borderWidth()*2 + (*it)->heightOffset(); 96 int curr_h = (*it)->height() + (*it)->fbWindow().borderWidth()*2 + (*it)->heightOffset();
97 97
diff --git a/src/RowSmartPlacement.cc b/src/RowSmartPlacement.cc
index 1c66a18..22ab768 100644
--- a/src/RowSmartPlacement.cc
+++ b/src/RowSmartPlacement.cc
@@ -103,8 +103,8 @@ bool RowSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
103 for (; win_it != win_it_end && placed; ++win_it) { 103 for (; win_it != win_it_end && placed; ++win_it) {
104 FluxboxWindow &window = **win_it; 104 FluxboxWindow &window = **win_it;
105 105
106 int curr_x = window.x() + window.xOffset(); 106 int curr_x = window.x() - window.xOffset(); // minus offset to get back up to fake place
107 int curr_y = window.y() + window.yOffset(); 107 int curr_y = window.y() - window.yOffset();
108 int curr_w = window.width() + window.fbWindow().borderWidth()*2 + window.widthOffset(); 108 int curr_w = window.width() + window.fbWindow().borderWidth()*2 + window.widthOffset();
109 int curr_h = window.height() + window.fbWindow().borderWidth()*2 + window.heightOffset(); 109 int curr_h = window.height() + window.fbWindow().borderWidth()*2 + window.heightOffset();
110 110
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc
index ef1f243..86c0804 100644
--- a/src/ScreenPlacement.cc
+++ b/src/ScreenPlacement.cc
@@ -47,8 +47,8 @@ ScreenPlacement::ScreenPlacement(BScreen &screen):
47 m_placement_policy(screen.resourceManager(), ROWSMARTPLACEMENT, 47 m_placement_policy(screen.resourceManager(), ROWSMARTPLACEMENT,
48 screen.name()+".windowPlacement", 48 screen.name()+".windowPlacement",
49 screen.altName()+".WindowPlacement"), 49 screen.altName()+".WindowPlacement"),
50 m_old_policy(*m_placement_policy), 50 m_old_policy(ROWSMARTPLACEMENT),
51 m_strategy(new RowSmartPlacement()) 51 m_strategy(0)
52{ 52{
53} 53}
54 54
@@ -56,9 +56,10 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist
56 const FluxboxWindow &win, 56 const FluxboxWindow &win,
57 int &place_x, int &place_y) { 57 int &place_x, int &place_y) {
58 58
59
59 // check the resource placement and see if has changed 60 // check the resource placement and see if has changed
60 // and if so update the strategy 61 // and if so update the strategy
61 if (m_old_policy != *m_placement_policy) { 62 if (m_old_policy != *m_placement_policy || !m_strategy.get()) {
62 m_old_policy = *m_placement_policy; 63 m_old_policy = *m_placement_policy;
63 switch (*m_placement_policy) { 64 switch (*m_placement_policy) {
64 case ROWSMARTPLACEMENT: 65 case ROWSMARTPLACEMENT: