From 8ebb6969cbe49e75df37d8d7b55ae0814d7f3878 Mon Sep 17 00:00:00 2001 From: Jeremy Tan Date: Fri, 15 Apr 2016 19:22:20 +0800 Subject: [PATCH] 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 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 9815199b0c..6668cd659b 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; }