diff options
author | simonb <simonb> | 2006-03-20 13:18:31 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-03-20 13:18:31 (GMT) |
commit | 8e4f538cf9872ab0f44ad1e467d256e6626f768c (patch) | |
tree | 5e0327c361e11254369cedf385428766f9b732d4 | |
parent | f2d3fff4d4db7677814379139dcec3e31fc68047 (diff) | |
download | fluxbox-8e4f538cf9872ab0f44ad1e467d256e6626f768c.zip fluxbox-8e4f538cf9872ab0f44ad1e467d256e6626f768c.tar.bz2 |
some small placement fixes
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/ColSmartPlacement.cc | 6 | ||||
-rw-r--r-- | src/RowSmartPlacement.cc | 4 | ||||
-rw-r--r-- | src/ScreenPlacement.cc | 7 |
4 files changed, 12 insertions, 8 deletions
@@ -1,6 +1,9 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.16: | 2 | Changes 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: |