Module: wine Branch: master Commit: fae404669490453e126fd78b6016a6e13ee9bd69 URL: https://gitlab.winehq.org/wine/wine/-/commit/fae404669490453e126fd78b6016a6e...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Jun 4 09:32:48 2024 +0200
win32u: Don't map points to the parent window in move_window_bits_parent.
We now use NtGdiStretchBlt, and the valid rects are relative to the window rect, not the parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56766
---
dlls/win32u/dce.c | 3 +-- dlls/win32u/win32u_private.h | 2 +- dlls/win32u/window.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c index 04c0fdfa248..47c624cacc6 100644 --- a/dlls/win32u/dce.c +++ b/dlls/win32u/dce.c @@ -1265,7 +1265,7 @@ void move_window_bits_surface( HWND hwnd, const RECT *window_rect, struct window * * Move the window bits in the parent surface when a child is moved. */ -void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect, const RECT *valid_rects ) +void move_window_bits_parent( HWND hwnd, const RECT *window_rect, const RECT *valid_rects ) { RECT dst = valid_rects[0]; RECT src = valid_rects[1]; @@ -1273,7 +1273,6 @@ void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect, c if (src.left != dst.left || src.top != dst.top) { TRACE( "copying %s -> %s\n", wine_dbgstr_rect( &src ), wine_dbgstr_rect( &dst )); - map_window_points( NtUserGetAncestor( hwnd, GA_PARENT ), parent, (POINT *)&src, 2, get_thread_dpi() ); OffsetRect( &src, -window_rect->left, -window_rect->top ); OffsetRect( &dst, -window_rect->left, -window_rect->top );
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 54b3798d8fb..9ec941ca7d4 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -53,7 +53,7 @@ extern void move_window_bits( HWND hwnd, const RECT *visible_rect, const RECT *o const RECT *window_rect, const RECT *valid_rects ); extern void move_window_bits_surface( HWND hwnd, const RECT *window_rect, struct window_surface *old_surface, const RECT *old_visible_rect, const RECT *valid_rects ); -extern void move_window_bits_parent( HWND hwnd, HWND parent, const RECT *window_rect, +extern void move_window_bits_parent( HWND hwnd, const RECT *window_rect, const RECT *valid_rects ); extern void register_window_surface( struct window_surface *old, struct window_surface *new ); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 22e9e326d6e..b868053796d 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1959,7 +1959,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, rects[1] = old_visible_rect; valid_rects = rects; } - move_window_bits_parent( hwnd, surface_win, window_rect, valid_rects ); + move_window_bits_parent( hwnd, window_rect, valid_rects ); valid_rects = NULL; /* prevent the driver from trying to also move the bits */ } }