[gtk+] GDK W32: Fix positioning of reparented window



commit 8ebb6969cbe49e75df37d8d7b55ae0814d7f3878
Author: Jeremy Tan <jtanx outlook com>
Date:   Fri Apr 15 19:22:20 2016 +0800

    GDK W32: Fix positioning of reparented window
    
    MoveWindow should not be used over the pre-existing move/resize
    functions, which already correctly position a window with respect
    to its parent, while also taking into account the size of window
    decorations.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765100

 gdk/win32/gdkwindow-win32.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 9815199..6668cd6 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1706,9 +1706,6 @@ gdk_win32_window_reparent (GdkWindow *window,
   API_CALL (SetParent, (GDK_WINDOW_HWND (window),
                        GDK_WINDOW_HWND (new_parent)));
 
-  API_CALL (MoveWindow, (GDK_WINDOW_HWND (window),
-                        x, y, window->width, window->height, TRUE));
-
   /* From here on, we treat parents of type GDK_WINDOW_FOREIGN like
    * the root window
    */
@@ -1741,6 +1738,9 @@ gdk_win32_window_reparent (GdkWindow *window,
        }
     }
 
+  /* Move window into desired position while keeping the same client area */
+  gdk_win32_window_move_resize (window, TRUE, x, y, window->width, window->height);
+
   return FALSE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]