From 8647380744a7c78a6818451918676d3ac86c6b86 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 7 Apr 2022 09:34:21 +1000 Subject: [PATCH] Rebase against 5a815669e8e7a3f0a37648510494f8b36c29c1f6. --- patches/patchinstall.sh | 5 +- ...r-to-find-a-target-for-mouse-message.patch | 47 ++++++++++++------- ...ser32-msgbox-Support-WM_COPY-Message.patch | 2 +- staging/upstream-commit | 2 +- 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 59f6d484..34c3f04f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8091f3a0b8463d41049ed4ade98c79f82c86ebbc" + echo "5a815669e8e7a3f0a37648510494f8b36c29c1f6" } # Show version information @@ -3239,7 +3239,8 @@ fi # | * [#9512] Make sure popups don't block access to objects underneath in DVDPro # | # | Modified files: -# | * dlls/user32/message.c, dlls/user32/tests/input.c, dlls/winex11.drv/bitblt.c, server/protocol.def, server/window.c +# | * dlls/user32/message.c, dlls/user32/tests/input.c, dlls/win32u/message.c, dlls/winex11.drv/bitblt.c, server/protocol.def, +# | server/window.c # | if test "$enable_user32_Mouse_Message_Hwnd" -eq 1; then patch_apply user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch diff --git a/patches/user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch b/patches/user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch index 84844ca5..99cf2756 100644 --- a/patches/user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch +++ b/patches/user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch @@ -1,31 +1,31 @@ -From 0bbae8697644dc706de5072b4b350690fcb0208c Mon Sep 17 00:00:00 2001 +From 613c51cb67f5ecd654cfd32478b94d9a739856e2 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 25 Nov 2014 20:31:58 +0100 -Subject: [PATCH 1/5] user32: Try harder to find a target for mouse messages +Subject: [PATCH] user32: Try harder to find a target for mouse messages --- - dlls/user32/message.c | 2 +- + dlls/user32/message.c | 1 - dlls/user32/tests/input.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + dlls/win32u/message.c | 4 ++-- + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c -index 6b7f918..5db3806 100644 +index 0b4d4ecc603..a53889afc37 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c -@@ -2504,7 +2504,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H - { - HWND orig = msg->hwnd; +@@ -592,7 +592,6 @@ BOOL process_rawinput_message( MSG *msg, UINT hw_id, const struct hardware_msg_d + return TRUE; + } -- msg->hwnd = WINPOS_WindowFromPoint( msg->hwnd, msg->pt, &hittest ); -+ msg->hwnd = WINPOS_WindowFromPoint( 0, msg->pt, &hittest ); - if (!msg->hwnd) /* As a heuristic, try the next window if it's the owner of orig */ - { - HWND next = GetWindow( orig, GW_HWNDNEXT ); +- + /*********************************************************************** + * SendMessageTimeoutW (USER32.@) + */ diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index e52f7d2..437e70c 100644 +index d7520459c6d..0969c41edcb 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c -@@ -2029,8 +2029,8 @@ static void test_Input_mouse(void) +@@ -3466,8 +3466,8 @@ static void test_Input_mouse(void) } } ok(hittest_no && hittest_no<50, "expected WM_NCHITTEST message\n"); @@ -36,6 +36,21 @@ index e52f7d2..437e70c 100644 DestroyWindow(static_win); /* click on HTTRANSPARENT top-level window that belongs to other thread */ +diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c +index 8d32eaf2f2d..ff6884ca364 100644 +--- a/dlls/win32u/message.c ++++ b/dlls/win32u/message.c +@@ -1400,8 +1400,8 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H + else + { + HWND orig = msg->hwnd; +- +- msg->hwnd = window_from_point( msg->hwnd, msg->pt, &hittest ); ++ ++ msg->hwnd = window_from_point( 0, msg->pt, &hittest ); + if (!msg->hwnd) /* As a heuristic, try the next window if it's the owner of orig */ + { + HWND next = get_window_relative( orig, GW_HWNDNEXT ); -- -2.7.4 +2.35.1 diff --git a/patches/user32-msgbox-Support-WM_COPY-mesg/0001-user32-msgbox-Support-WM_COPY-Message.patch b/patches/user32-msgbox-Support-WM_COPY-mesg/0001-user32-msgbox-Support-WM_COPY-Message.patch index 45c2b97d..409d472e 100644 --- a/patches/user32-msgbox-Support-WM_COPY-mesg/0001-user32-msgbox-Support-WM_COPY-Message.patch +++ b/patches/user32-msgbox-Support-WM_COPY-mesg/0001-user32-msgbox-Support-WM_COPY-Message.patch @@ -108,7 +108,7 @@ index 3da1c0a3445..b29af2161b6 100644 + OpenClipboard(hwnd); + EmptyClipboard(); + SetClipboardData(CF_UNICODETEXT, hMem); -+ CloseClipboard(); ++ NtUserCloseClipboard(); + } + + heap_free(text); diff --git a/staging/upstream-commit b/staging/upstream-commit index 03008133..fcc66a5d 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -8091f3a0b8463d41049ed4ade98c79f82c86ebbc +5a815669e8e7a3f0a37648510494f8b36c29c1f6