aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc27
-rw-r--r--src/Screen.hh3
2 files changed, 17 insertions, 13 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 16f39b1..a97f1aa 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1963,21 +1963,23 @@ WinClient *BScreen::findGroupRight(WinClient &winclient) {
1963 1963
1964 return other; 1964 return other;
1965} 1965}
1966void BScreen::clearXinerama() {
1967#ifdef DEBUG
1968 cerr<<"BScreen::initXinerama(): dont have Xinerama"<<endl;
1969#endif // DEBUG
1970 m_xinerama_avail = false;
1971 if (m_xinerama_headinfo)
1972 delete [] m_xinerama_headinfo;
1973 m_xinerama_headinfo = 0;
1974 m_xinerama_num_heads = 0;
1975}
1966 1976
1967void BScreen::initXinerama() { 1977void BScreen::initXinerama() {
1968#ifdef XINERAMA 1978#ifdef XINERAMA
1969 Display *display = FbTk::App::instance()->display(); 1979 Display *display = FbTk::App::instance()->display();
1970 1980
1971 if (!XineramaIsActive(display)) { 1981 if (!XineramaIsActive(display)) {
1972notactive: 1982 clearXinerama();
1973#ifdef DEBUG
1974 cerr<<"BScreen::initXinerama(): dont have Xinerama"<<endl;
1975#endif // DEBUG
1976 m_xinerama_avail = false;
1977 if (m_xinerama_headinfo)
1978 delete [] m_xinerama_headinfo;
1979 m_xinerama_headinfo = 0;
1980 m_xinerama_num_heads = 0;
1981 return; 1983 return;
1982 } 1984 }
1983#ifdef DEBUG 1985#ifdef DEBUG
@@ -1993,10 +1995,9 @@ notactive:
1993 * Xinerama, fall back to turning it off. If not, pretend nothing 1995 * Xinerama, fall back to turning it off. If not, pretend nothing
1994 * happened -- another event will tell us and it will work then. */ 1996 * happened -- another event will tell us and it will work then. */
1995 if (!screen_info) { 1997 if (!screen_info) {
1996 if (m_xinerama_headinfo) 1998 if (!m_xinerama_headinfo)
1997 return; 1999 clearXinerama();
1998 else 2000 return;
1999 goto notactive;
2000 } 2001 }
2001 2002
2002 if (m_xinerama_headinfo) 2003 if (m_xinerama_headinfo)
diff --git a/src/Screen.hh b/src/Screen.hh
index f0dbcc6..d42fea0 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -407,6 +407,9 @@ public:
407 407
408 void initXinerama(); 408 void initXinerama();
409 void clearHeads(); 409 void clearHeads();
410 /// clean up xinerama
411 void clearXinerama();
412
410 /** 413 /**
411 * Determines head number for a position 414 * Determines head number for a position
412 * @param x position in pixels on the screen 415 * @param x position in pixels on the screen