ecere/gui/drivers/XInterface: Fixed non-resizable windows on WMs not supporting MWM_FUNC
authorJerome St-Louis <jerome@ecere.com>
Sun, 9 Feb 2014 03:40:58 +0000 (10:40 +0700)
committerJerome St-Louis <jerome@ecere.com>
Sun, 9 Feb 2014 03:58:06 +0000 (10:58 +0700)
ecere/src/gui/drivers/XInterface.ec

index 383a591..f7b05f1 100644 (file)
@@ -2703,6 +2703,16 @@ class XInterface : Interface
                XMoveWindow(xGlobalDisplay, (X11Window)window.windowHandle, x, y);
             else if(resize)
                XResizeWindow(xGlobalDisplay, (X11Window)window.windowHandle, w, h);
+
+            // Reset min/max for fixed size windows on WMs not looking at MWM_FUNC_RESIZE (e.g. Cinnamon)
+            if(window.style.fixed && !window.style.sizable)
+            {
+               XSizeHints hints = { 0 };
+               hints.min_width = hints.max_width = w;
+               hints.min_height = hints.max_height = h;
+               hints.flags |= PMinSize|PMaxSize|PPosition|PSize;
+               XSetWMNormalHints(xGlobalDisplay, (X11Window)window.windowHandle, &hints);
+            }
          }
 #if defined(__APPLE__)
 //         if(window.created && !visible)