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
This commit is contained in:
committed by
Руслан Ижбулатов
parent
8a2061f581
commit
8ebb6969cb
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user