Fix Linux dual head breakage on exit
authorToni Spets <toni.spets@iki.fi>
Tue, 1 Mar 2011 18:34:02 +0000 (20:34 +0200)
committerToni Spets <toni.spets@iki.fi>
Tue, 1 Mar 2011 18:34:02 +0000 (20:34 +0200)
src/arch/LowLevelWindow/LowLevelWindow_X11.cpp

index b908176..47ed820 100755 (executable)
@@ -63,11 +63,14 @@ LowLevelWindow_X11::~LowLevelWindow_X11()
                DPMSSetTimeouts( g_X11Display, m_DPMSData.standby, m_DPMSData.suspend, m_DPMSData.off );
        }
 
+
+       if( !m_bWasWindowed )
        {
                XRRSetScreenConfig( g_X11Display, g_pScreenConfig, RootWindow(g_X11Display, DefaultScreen(g_X11Display)), g_iOldSize, g_OldRotation, CurrentTime );
-               XUngrabKeyboard( g_X11Display, CurrentTime );
        }
 
+       XUngrabKeyboard( g_X11Display, CurrentTime );
+
        X11Helper::Stop();      // Xlib cleans up the window for us
 }