Module: wine Branch: master Commit: eb1f9896cc023786e5d1a1d0e7e9ea434a9d7cae URL: https://gitlab.winehq.org/wine/wine/-/commit/eb1f9896cc023786e5d1a1d0e7e9ea4...
Author: Jinoh Kang jinoh.kang.kr@gmail.com Date: Thu Dec 22 01:21:48 2022 +0900
win32u: Honor CS_HREDRAW and CS_VREDRAW when resizing window.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52903
---
dlls/user32/tests/msg.c | 1 - dlls/win32u/window.c | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 461d79d9a5d..35e4f0dd1f8 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9475,7 +9475,6 @@ static void subtest_hvredraw(HWND hparent, const char *classname, DWORD style) CombineRgn( hrgn_expect, hrgn_new_vis, hrgn_old_vis, is_redraw ? RGN_COPY : RGN_DIFF );
rgn_ok = EqualRgn( hrgn_expect, hrgn_actual ); - todo_wine_if( is_redraw ) ok( !!rgn_ok, "Update region shall match expected region\n" );
if (!rgn_ok && winetest_debug > 1) diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 19348338c46..a3ff0647dcd 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -3116,6 +3116,7 @@ static UINT calc_ncsize( WINDOWPOS *winpos, const RECT *old_window_rect, const R { NCCALCSIZE_PARAMS params; WINDOWPOS winposCopy; + UINT class_style;
params.rgrc[0] = *new_window_rect; params.rgrc[1] = *old_window_rect; @@ -3135,7 +3136,11 @@ static UINT calc_ncsize( WINDOWPOS *winpos, const RECT *old_window_rect, const R winposCopy.cy = old_window_rect->bottom - old_window_rect->top; }
- wvr_flags = send_message( winpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms ); + class_style = get_class_long( winpos->hwnd, GCL_STYLE, FALSE ); + if (class_style & CS_VREDRAW) wvr_flags |= WVR_VREDRAW; + if (class_style & CS_HREDRAW) wvr_flags |= WVR_HREDRAW; + + wvr_flags |= send_message( winpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms );
*new_client_rect = params.rgrc[0];