aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index e54b328..45ca998 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1990,11 +1990,26 @@ void BScreen::clearHeads() {
1990 for (Workspace::Windows::iterator win = (*i)->windowList().begin(); 1990 for (Workspace::Windows::iterator win = (*i)->windowList().begin();
1991 win != (*i)->windowList().end(); win++) { 1991 win != (*i)->windowList().end(); win++) {
1992 1992
1993 int closest_head = getHead((*win)->fbWindow()); 1993 FluxboxWindow& w = *(*win);
1994 if (closest_head == 0) { 1994
1995 closest_head = 1; // first head is a safe bet here 1995 // check if the window is invisible
1996 bool invisible = true;
1997 int j;
1998 for (j = 0; j < m_xinerama_num_heads; ++j) {
1999 XineramaHeadInfo& hi = m_xinerama_headinfo[j];
2000 if (RectangleUtil::overlapRectangles(hi, w)) {
2001 invisible = false;
2002 break;
2003 }
2004 }
2005
2006 if (invisible) { // get closest head and replace the (now invisible) cwindow
2007 int closest_head = getHead(w.fbWindow());
2008 if (closest_head == 0) {
2009 closest_head = 1; // first head is a safe bet here
2010 }
2011 w.placeWindow(closest_head);
1996 } 2012 }
1997 (*win)->placeWindow(closest_head);
1998 } 2013 }
1999 } 2014 }
2000} 2015}