ecere/gui/drivers/XInterface: Still calling _NET_WM_STATE for native decorations...
authorJerome St-Louis <jerome@ecere.com>
Sat, 8 Feb 2014 09:51:22 +0000 (16:51 +0700)
committerJerome St-Louis <jerome@ecere.com>
Sun, 9 Feb 2014 03:39:23 +0000 (10:39 +0700)
ecere/src/gui/drivers/XInterface.ec

index 5cec469..33a1b7b 100644 (file)
@@ -2630,33 +2630,35 @@ class XInterface : Interface
             }
             else
             {
-               if(!window.nativeDecorations || (!((XWindowData)window.windowData).gotFrameExtents && window.state == maximized)) //((XWindowData)window.windowData).gotFrameExtents && (!window.nativeDecorations || window.state == state))
+               if(!atomsSupported[_net_wm_state] || !window.nativeDecorations || (!((XWindowData)window.windowData).gotFrameExtents && window.state == maximized)) //((XWindowData)window.windowData).gotFrameExtents && (!window.nativeDecorations || window.state == state))
                {
-                  int x = window.position.x;
-                  int y = window.position.y;
-                  int w = window.size.w;
-                  int h = window.size.h;
-
-                  if(window.nativeDecorations)
+                  // With native decorations, we do it the first time
+                  // or the WM (Gnome) is sticking it to the top/right!
                   {
-                     XWindowData windowData = window.windowData;
-                     x -= windowData.decor.left;
-                     y -= windowData.decor.top;
+                     int x = window.position.x;
+                     int y = window.position.y;
+                     int w = window.size.w;
+                     int h = window.size.h;
 
-                     w -= windowData.decor.left + windowData.decor.right;
-                     h -= windowData.decor.top + windowData.decor.bottom;
-                  }
-                  x += desktopX;
-                  y += desktopY;
+                     if(window.nativeDecorations)
+                     {
+                        XWindowData windowData = window.windowData;
+                        x -= windowData.decor.left;
+                        y -= windowData.decor.top;
 
-                  // With native decorations, we do it the first time
-                  // or the WM (Gnome) is sticking it to the top/right!
-                  XMoveResizeWindow(xGlobalDisplay,
-                     (X11Window)window.windowHandle,
-                     x, y, w, h);
+                        w -= windowData.decor.left + windowData.decor.right;
+                        h -= windowData.decor.top + windowData.decor.bottom;
+                     }
+                     x += desktopX;
+                     y += desktopY;
+
+                     XMoveResizeWindow(xGlobalDisplay,
+                        (X11Window)window.windowHandle,
+                        x, y, w, h);
+                  }
                   UpdateRootWindow(window);
                }
-               if(window.nativeDecorations)
+               if(atomsSupported[_net_wm_state])
                {
                   // Maximize / Restore the window
                   XClientMessageEvent event = { 0 };