summaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index c6379a0..36b1918 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1909,6 +1909,9 @@ void BScreen::updateSize() {
1909 // send resize notify 1909 // send resize notify
1910 m_resize_sig.notify(); 1910 m_resize_sig.notify();
1911 m_workspace_area_sig.notify(); 1911 m_workspace_area_sig.notify();
1912
1913 // move windows out of inactive heads
1914 clearHeads();
1912} 1915}
1913 1916
1914 1917
@@ -2020,6 +2023,22 @@ notactive:
2020 2023
2021} 2024}
2022 2025
2026/* Move windows out of inactive heads */
2027void BScreen::clearHeads() {
2028 if (!hasXinerama()) return;
2029
2030 for (Workspaces::iterator i = m_workspaces_list.begin();
2031 i != m_workspaces_list.end(); i++) {
2032 for (Workspace::Windows::iterator win = (*i)->windowList().begin();
2033 win != (*i)->windowList().end(); win++) {
2034 if (getHead((*win)->fbWindow()) == 0) {
2035 // first head is a safe bet here
2036 (*win)->placeWindow(1);
2037 }
2038 }
2039 }
2040}
2041
2023int BScreen::getHead(int x, int y) const { 2042int BScreen::getHead(int x, int y) const {
2024 if (!hasXinerama()) return 0; 2043 if (!hasXinerama()) return 0;
2025#ifdef XINERAMA 2044#ifdef XINERAMA