ecere: gui/Window: tweak to update normalAnchor and normalSizeAnchor for gui config.
authorRejean Loyer <redj@ecere.com>
Thu, 16 Oct 2014 04:40:47 +0000 (00:40 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 15 Oct 2015 00:19:22 +0000 (20:19 -0400)
 - for GuiConfigData.ec functionality.

ecere/src/gui/Window.ec
ecere/src/gui/drivers/Win32Interface.ec

index 722b7e8..7cf3dd5 100644 (file)
@@ -1664,6 +1664,15 @@ private:
    public void ExternalPosition(int x, int y, int w, int h)
    {
       Position(x, y, w, h, false, true, true, true, false, false);
+      if(style.fixed)
+      {
+         if(state == normal)
+         {
+            normalAnchor = Anchor { left = x, top = y };
+            normalSizeAnchor = SizeAnchor { { w, h } };
+            anchored = false;
+         }
+      }
    }
 
    // (w, h): Full window size
index b2ffe77..cd413db 100644 (file)
@@ -931,11 +931,8 @@ class Win32Interface : Interface
             case WM_MOVE:
             {
                int x, y, w, h;
-               WINDOWPLACEMENT placement = { 0 };
                RECT rcWindow;
-               placement.length = sizeof(WINDOWPLACEMENT);
                GetWindowRect(windowHandle, &rcWindow);
-               GetWindowPlacement(windowHandle, &placement);
 
                x = rcWindow.left - desktopX;
                y = rcWindow.top  - desktopY;