From: Rémi Bernon rbernon@codeweavers.com
We need to call update_surface_region whenever the window rect changes as it uses the visible rect to clip the regions to the visible area of the window.
We could delegate this to the host windowing system in most cases, but it was explicitly clipped to the visible rect in the Android driver.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57551 --- dlls/win32u/window.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 4855555d926..ba204957669 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2046,7 +2046,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru struct window_rects monitor_rects; WND *win; HWND owner_hint, surface_win = 0, parent = NtUserGetAncestor( hwnd, GA_PARENT ); - BOOL ret, is_fullscreen, is_layered, is_child, needs_update = FALSE; + BOOL ret, is_fullscreen, is_layered, is_child; struct window_rects old_rects; RECT extra_rects[3]; struct window_surface *old_surface; @@ -2064,11 +2064,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru
if (!(win = get_win_ptr( hwnd )) || win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE; old_surface = win->surface; - if (old_surface != new_surface) - { - if (old_surface && new_surface) window_surface_set_shape( new_surface, old_surface->shape_region ); - swp_flags |= SWP_FRAMECHANGED; /* force refreshing non-client area */ - } + if (old_surface != new_surface) swp_flags |= SWP_FRAMECHANGED; /* force refreshing non-client area */
if (new_surface == &dummy_surface) swp_flags |= SWP_NOREDRAW; else if (old_surface == &dummy_surface) @@ -2112,7 +2108,6 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru win->rects = *new_rects; if ((win->surface = new_surface)) window_surface_add_ref( win->surface ); surface_win = wine_server_ptr_handle( reply->surface_win ); - needs_update = reply->needs_update; if (get_window_long( win->parent, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) { RECT client = {0}; @@ -2131,7 +2126,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru
if (ret) { - if (needs_update) update_surface_region( surface_win ); + update_surface_region( surface_win ); if (((swp_flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE) || (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW | SWP_STATECHANGED | SWP_FRAMECHANGED))) invalidate_dce( win, &old_rects.window );