From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/window.c | 9 ++++++++- dlls/wineandroid.drv/window.c | 2 +- dlls/winemac.drv/macdrv.h | 2 +- dlls/winewayland.drv/waylanddrv.h | 2 +- dlls/winex11.drv/x11drv.h | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index ee532cb8459..f7009004bd1 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1927,6 +1927,10 @@ static struct window_surface *get_window_surface( HWND hwnd, UINT swp_flags, BOO
rects->visible = rects->window; monitor_rects = map_dpi_window_rects( *rects, get_thread_dpi(), monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.window, 2, monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.client, 2, monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.visible, 2, monitor_dpi ); + if (!user_driver->pWindowPosChanging( hwnd, swp_flags, shaped, &monitor_rects )) needs_surface = FALSE; else if (is_child) needs_surface = FALSE; else if (swp_flags & SWP_HIDEWINDOW) needs_surface = FALSE; @@ -2000,7 +2004,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru { struct window_rects monitor_rects; WND *win; - HWND surface_win = 0; + HWND surface_win = 0, parent = NtUserGetAncestor( hwnd, GA_PARENT ); BOOL ret, is_layered, needs_update = FALSE; struct window_rects old_rects; RECT extra_rects[3]; @@ -2030,6 +2034,9 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru monitor_dpi = get_monitor_dpi( monitor );
monitor_rects = map_dpi_window_rects( *new_rects, get_thread_dpi(), monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.window, 2, monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.client, 2, monitor_dpi ); + map_window_points( parent, 0, (POINT *)&monitor_rects.visible, 2, monitor_dpi );
SERVER_START_REQ( set_window_pos ) { diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 537aae456e7..c131105e914 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -52,7 +52,7 @@ struct android_win_data { HWND hwnd; /* hwnd that this private data belongs to */ HWND parent; /* parent hwnd for child windows */ - struct window_rects rects; /* window rects in monitor DPI, relative to parent client area */ + struct window_rects rects; /* window rects in monitor DPI, relative to virtual screen */ ANativeWindow *window; /* native window wrapper that forwards calls to the desktop process */ };
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 3f14f1c0c19..4c0ee79440f 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -185,7 +185,7 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p macdrv_window cocoa_window; macdrv_view cocoa_view; macdrv_view client_cocoa_view; - struct window_rects rects; /* window rects in monitor DPI, relative to parent client area */ + struct window_rects rects; /* window rects in monitor DPI, relative to virtual screen */ int pixel_format; /* pixel format for GL */ HANDLE drag_event; /* event to signal that Cocoa-driven window dragging has ended */ unsigned int on_screen : 1; /* is window ordered in? (minimized or not) */ diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 9de42758aa1..4f9d43015d0 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -284,7 +284,7 @@ struct wayland_win_data struct wayland_surface *wayland_surface; /* wayland client surface (if any) for this window */ struct wayland_client_surface *client_surface; - /* window rects, relative to parent client area */ + /* window rects, relative to virtual screen */ struct window_rects rects; BOOL managed; }; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index bb4c9caeb43..562d695038f 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -601,7 +601,7 @@ struct x11drv_win_data HWND hwnd; /* hwnd that this private data belongs to */ Window whole_window; /* X window for the complete window */ Window client_window; /* X window for the client area */ - struct window_rects rects; /* window rects in monitor DPI, relative to parent client area */ + struct window_rects rects; /* window rects in monitor DPI, relative to virtual screen */ XIC xic; /* X input context */ UINT managed : 1; /* is window managed? */ UINT mapped : 1; /* is window mapped? (in either normal or iconic state) */