use new closest head calculation code to place windows when clearing up heads

This commit is contained in:
Mathias Gumz 2010-05-01 14:29:31 +02:00
parent d6bc8d753e
commit b3361eae02

View file

@ -2001,10 +2001,12 @@ void BScreen::clearHeads() {
i != m_workspaces_list.end(); i++) { i != m_workspaces_list.end(); i++) {
for (Workspace::Windows::iterator win = (*i)->windowList().begin(); for (Workspace::Windows::iterator win = (*i)->windowList().begin();
win != (*i)->windowList().end(); win++) { win != (*i)->windowList().end(); win++) {
if (getHead((*win)->fbWindow()) == 0) {
// first head is a safe bet here int closest_head = getHead((*win)->fbWindow());
(*win)->placeWindow(1); if (closest_head == 0) {
closest_head = 1; // first head is a safe bet here
} }
(*win)->placeWindow(closest_head);
} }
} }
} }