Rebase against 670a1e81b465f67cb7e49fdb84c1fc96853fc9d7.

This commit is contained in:
Alistair Leslie-Hughes
2022-03-16 11:19:13 +11:00
parent 7b49214435
commit a853455a23
7 changed files with 85 additions and 80 deletions

View File

@@ -1,4 +1,4 @@
From 93abf7b468f93d525ef47754737496a11facaec4 Mon Sep 17 00:00:00 2001
From d0087c1c1d68b0bda581ca9a394d8b980dd7a430 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Wed, 16 Sep 2020 17:35:09 +0300
Subject: [PATCH] user32: Fix messages sent on a window without WS_CHILD, but
@@ -17,15 +17,16 @@ This also fixes a TODO message sequence, so that Wine matches Windows.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40262
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
---
dlls/user32/tests/msg.c | 3 ++-
dlls/user32/winpos.c | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
dlls/user32/tests/msg.c | 3 ++-
dlls/user32/winpos.c | 4 ++--
dlls/win32u/window.c | 7 +++++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index c6f2bc38c6c..9164f57fdc2 100644
index 4e2d39dff10..f28b1151c4d 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -17117,6 +17117,7 @@ static const struct message WmSetParentSeq_2[] = {
@@ -17118,6 +17118,7 @@ static const struct message WmSetParentSeq_2[] = {
{ HCBT_ACTIVATE, hook|optional },
{ EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|optional, 0, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE },
@@ -33,7 +34,7 @@ index c6f2bc38c6c..9164f57fdc2 100644
{ WM_NCACTIVATE, sent|wparam|optional, 1 },
{ WM_ACTIVATE, sent|wparam|optional, 1 },
{ HCBT_SETFOCUS, hook|optional },
@@ -17187,7 +17188,7 @@ static void test_SetParent(void)
@@ -17188,7 +17189,7 @@ static void test_SetParent(void)
SetParent(popup, child);
flush_events();
@@ -43,10 +44,10 @@ index c6f2bc38c6c..9164f57fdc2 100644
ok(GetWindowLongA(popup, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n");
ok(!IsWindowVisible(popup), "IsWindowVisible() should return FALSE\n");
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 3238d0c1b50..b0a4fac958a 100644
index b3e8aff3cfa..eaa965fdbee 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1029,8 +1029,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
@@ -983,8 +983,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
}
swp = new_swp;
@@ -57,19 +58,23 @@ index 3238d0c1b50..b0a4fac958a 100644
{
/* if parent is not visible simply toggle WS_VISIBLE and return */
if (showFlag) WIN_SetStyle( hwnd, WS_VISIBLE, 0 );
@@ -1849,8 +1849,11 @@ static BOOL fixup_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int par
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c
index c9801ff8870..71b75445efa 100644
--- a/dlls/win32u/window.c
+++ b/dlls/win32u/window.c
@@ -2315,8 +2315,11 @@ static BOOL fixup_swp_flags( WINDOWPOS *winpos, const RECT *old_window_rect, int
if (winpos->cy < 0) winpos->cy = 0;
else if (winpos->cy > 32767) winpos->cy = 32767;
- parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT );
- if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW;
+ if (wndPtr->dwStyle & WS_CHILD)
- if (!is_window_visible( parent )) winpos->flags |= SWP_NOREDRAW;
+ if (win->dwStyle & WS_CHILD)
+ {
+ parent = NtUserGetAncestor( winpos->hwnd, GA_PARENT );
+ if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW;
+ if (!is_window_visible( parent )) winpos->flags |= SWP_NOREDRAW;
+ }
if (wndPtr->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW;
if (win->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW;
else
--
2.35.1