summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-05-01 12:29:31 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-05-01 12:29:31 (GMT)
commitb3361eae0229d18c9f23c5715fbceb745b44037e (patch)
tree11e4b4063493bc2a693f2338fff42bc0741a37eb
parentd6bc8d753e85ece940f5ec932fb71ba44b3d297b (diff)
downloadfluxbox_lack-b3361eae0229d18c9f23c5715fbceb745b44037e.zip
fluxbox_lack-b3361eae0229d18c9f23c5715fbceb745b44037e.tar.bz2
use new closest head calculation code to place windows when clearing up heads
-rw-r--r--src/Screen.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 17615fe..0b477d7 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1998,14 +1998,16 @@ void BScreen::clearHeads() {
1998 if (!hasXinerama()) return; 1998 if (!hasXinerama()) return;
1999 1999
2000 for (Workspaces::iterator i = m_workspaces_list.begin(); 2000 for (Workspaces::iterator i = m_workspaces_list.begin();
2001 i != m_workspaces_list.end(); i++) { 2001 i != m_workspaces_list.end(); i++) {
2002 for (Workspace::Windows::iterator win = (*i)->windowList().begin(); 2002 for (Workspace::Windows::iterator win = (*i)->windowList().begin();
2003 win != (*i)->windowList().end(); win++) { 2003 win != (*i)->windowList().end(); win++) {
2004 if (getHead((*win)->fbWindow()) == 0) { 2004
2005 // first head is a safe bet here 2005 int closest_head = getHead((*win)->fbWindow());
2006 (*win)->placeWindow(1); 2006 if (closest_head == 0) {
2007 closest_head = 1; // first head is a safe bet here
2007 } 2008 }
2008 } 2009 (*win)->placeWindow(closest_head);
2010 }
2009 } 2011 }
2010} 2012}
2011 2013