all repos — fluxbox @ b3361eae0229d18c9f23c5715fbceb745b44037e

custom fork of the fluxbox windowmanager

use new closest head calculation code to place windows when clearing up heads
Mathias Gumz akira at fluxbox dot org
commit

b3361eae0229d18c9f23c5715fbceb745b44037e

parent

d6bc8d753e85ece940f5ec932fb71ba44b3d297b

1 files changed, 9 insertions(+), 7 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -1998,14 +1998,16 @@ void BScreen::clearHeads() {

if (!hasXinerama()) return; for (Workspaces::iterator i = m_workspaces_list.begin(); - i != m_workspaces_list.end(); i++) { - for (Workspace::Windows::iterator win = (*i)->windowList().begin(); - win != (*i)->windowList().end(); win++) { - if (getHead((*win)->fbWindow()) == 0) { - // first head is a safe bet here - (*win)->placeWindow(1); + i != m_workspaces_list.end(); i++) { + for (Workspace::Windows::iterator win = (*i)->windowList().begin(); + win != (*i)->windowList().end(); win++) { + + int closest_head = getHead((*win)->fbWindow()); + if (closest_head == 0) { + closest_head = 1; // first head is a safe bet here } - } + (*win)->placeWindow(closest_head); + } } }