ecere/gui/drivers/XInterface: Improve on initial position to avoid flickering
authorJerome St-Louis <jerome@ecere.com>
Sat, 8 Feb 2014 14:13:45 +0000 (21:13 +0700)
committerJerome St-Louis <jerome@ecere.com>
Sun, 9 Feb 2014 03:39:28 +0000 (10:39 +0700)
ecere/src/gui/drivers/XInterface.ec

index 531f107..29d4547 100644 (file)
@@ -2313,9 +2313,14 @@ class XInterface : Interface
          else
          {
             X11Window parentWindow = (X11Window)null;
-            int x = window.position.x, y = window.position.y;
+            int x = window.position.x + desktopX, y = window.position.y + desktopY;
             int w = window.state == normal ? Max(1, window.size.w) : Max(1, window.normalSizeAnchor.size.w);
             int h = window.state == normal ? Max(1, window.size.h) : Max(1, window.normalSizeAnchor.size.h);
+            if(!window.nativeDecorations && window.state != normal)
+            {
+               w += window.size.w - window.clientSize.w;
+               h += window.size.h - window.clientSize.h;
+            }
 
             if(window.master.rootWindow && window.master.rootWindow != guiApp.desktop && (window._isModal || window.style.interim))
             {