all repos — fluxbox @ 8e4f538cf9872ab0f44ad1e467d256e6626f768c

custom fork of the fluxbox windowmanager

some small placement fixes
simonb simonb
commit

8e4f538cf9872ab0f44ad1e467d256e6626f768c

parent

f2d3fff4d4db7677814379139dcec3e31fc68047

4 files changed, 12 insertions(+), 8 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.16: *06/03/20: + * Fix placement config (some compilers resulted in ignoring of + placement policy setting), and a minor ext. tabs placement bug + ScreenPlacement.cc Row/ColSmartPlacement.cc * External tabs (Simon) - option in Configure menu to enable - restart require at present when toggling this option
M src/ColSmartPlacement.ccsrc/ColSmartPlacement.cc

@@ -66,7 +66,7 @@

while (!placed && (left_right ? test_x + win_w <= head_right : test_x >= head_left)) { - + if (left_right) next_x = head_right; // it will get shrunk else

@@ -90,8 +90,8 @@ windowlist.begin();

std::vector<FluxboxWindow *>::const_iterator it_end = windowlist.end(); for (; it != it_end && placed; ++it) { - int curr_x = (*it)->x() + (*it)->xOffset(); - int curr_y = (*it)->y() + (*it)->yOffset(); + int curr_x = (*it)->x() - (*it)->xOffset(); + int curr_y = (*it)->y() - (*it)->yOffset(); int curr_w = (*it)->width() + (*it)->fbWindow().borderWidth()*2 + (*it)->widthOffset(); int curr_h = (*it)->height() + (*it)->fbWindow().borderWidth()*2 + (*it)->heightOffset();
M src/RowSmartPlacement.ccsrc/RowSmartPlacement.cc

@@ -103,8 +103,8 @@

for (; win_it != win_it_end && placed; ++win_it) { FluxboxWindow &window = **win_it; - int curr_x = window.x() + window.xOffset(); - int curr_y = window.y() + window.yOffset(); + int curr_x = window.x() - window.xOffset(); // minus offset to get back up to fake place + int curr_y = window.y() - window.yOffset(); int curr_w = window.width() + window.fbWindow().borderWidth()*2 + window.widthOffset(); int curr_h = window.height() + window.fbWindow().borderWidth()*2 + window.heightOffset();
M src/ScreenPlacement.ccsrc/ScreenPlacement.cc

@@ -47,8 +47,8 @@ screen.altName()+".ColPlacementDirection"),

m_placement_policy(screen.resourceManager(), ROWSMARTPLACEMENT, screen.name()+".windowPlacement", screen.altName()+".WindowPlacement"), - m_old_policy(*m_placement_policy), - m_strategy(new RowSmartPlacement()) + m_old_policy(ROWSMARTPLACEMENT), + m_strategy(0) { }

@@ -56,9 +56,10 @@ bool ScreenPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowlist,

const FluxboxWindow &win, int &place_x, int &place_y) { + // check the resource placement and see if has changed // and if so update the strategy - if (m_old_policy != *m_placement_policy) { + if (m_old_policy != *m_placement_policy || !m_strategy.get()) { m_old_policy = *m_placement_policy; switch (*m_placement_policy) { case ROWSMARTPLACEMENT: