ecere/gui/drivers/XInterface: (#992) Improved fullscreen useability on Gnome Flashback
authorJerome St-Louis <jerome@ecere.com>
Sat, 15 Feb 2014 23:41:38 +0000 (15:41 -0800)
committerJerome St-Louis <jerome@ecere.com>
Sat, 15 Feb 2014 23:51:23 +0000 (15:51 -0800)
ecere/src/gui/drivers/XInterface.ec

index 8efbc50..fcdb7a7 100644 (file)
@@ -1915,6 +1915,15 @@ class XInterface : Interface
                }
                case FocusOut:
                {
+#ifdef _DEBUG
+                  //printf("Processing a FocusOut Event for %s (%x)\n", window._class.name, window);
+#endif
+
+                  if(XCheckTypedWindowEvent(xGlobalDisplay, thisEvent->window, FocusIn, (XEvent *)thisEvent))
+                  {
+                     break;
+                  }
+
                   if((X11Window)window.windowHandle == activeWindow)
                      guiApp.SetAppFocus(false);
 
@@ -1922,19 +1931,10 @@ class XInterface : Interface
                   {
                      SetNETWMState((X11Window)window.windowHandle, true, remove, atoms[_net_wm_state_fullscreen], 0);
                      XUngrabKeyboard(xGlobalDisplay, CurrentTime);
-                     // -- This XIconifyWindow causes trouble on Gnome Classic
                      XIconifyWindow(xGlobalDisplay, (X11Window)window.windowHandle, DefaultScreen(xGlobalDisplay));
                      break;
                   }
 
-#ifdef _DEBUG
-                  //printf("Processing a FocusOut Event for %s (%x)\n", window._class.name, window);
-#endif
-
-                  if(XCheckTypedWindowEvent(xGlobalDisplay, thisEvent->window, FocusIn, (XEvent *)thisEvent))
-                  {
-                     break;
-                  }
                   if(thisEvent->window == activeWindow)
                      activeWindow = (X11Window)null;
 #if 0