From 72730e4340d96e691da46a8d7ff635f3f9dd5704 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 26 Jan 2024 17:41:51 -0600 Subject: [PATCH] =?UTF-8?q?user32-Mouse=5FMessage=5FHwnd:=20Rebase=20(most?= =?UTF-8?q?ly)=20and=20re=C3=ABnable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests are left alone since they aren't particularly important and will need to be rewritten anyway. They should probably be somewhere other than input.c, since they don't actually relate to input. --- ...r-to-find-a-target-for-mouse-message.patch | 28 +++-------- ...port-for-a-layered-window-region.-v2.patch | 49 ++++++------------- patches/user32-Mouse_Message_Hwnd/definition | 1 - ...ser32-tests-Add-tests-for-DC-region.patch} | 0 4 files changed, 21 insertions(+), 57 deletions(-) rename patches/user32-Mouse_Message_Hwnd/{0004-user32-tests-Add-tests-for-DC-region.patch => xxx4-user32-tests-Add-tests-for-DC-region.patch} (100%) 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 499b6671..8a5be29b 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,33 +1,17 @@ -From cb9f379e0eef9b7f1a150633e200864cc1ded33f Mon Sep 17 00:00:00 2001 +From 7afa96cafc4f0c15360439b161df866eb2bec29b Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 25 Nov 2014 20:31:58 +0100 Subject: [PATCH] user32: Try harder to find a target for mouse messages --- - dlls/user32/tests/input.c | 4 ++-- - dlls/win32u/message.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) + dlls/win32u/message.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index 14641591bff..2bef3437109 100644 ---- a/dlls/user32/tests/input.c -+++ b/dlls/user32/tests/input.c -@@ -3466,8 +3466,8 @@ static void test_Input_mouse(void) - } - } - ok(hittest_no && hittest_no<50, "expected WM_NCHITTEST message\n"); -- todo_wine ok(got_button_down, "expected WM_LBUTTONDOWN message\n"); -- todo_wine ok(got_button_up, "expected WM_LBUTTONUP message\n"); -+ ok(got_button_down, "expected WM_LBUTTONDOWN message\n"); -+ ok(got_button_up, "expected WM_LBUTTONUP message\n"); - 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 644e91aed4f..4cb65eec36a 100644 +index 0cd20684b4e..08e2d047045 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c -@@ -1402,7 +1402,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H +@@ -2463,7 +2463,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H { HWND orig = msg->hwnd; @@ -37,5 +21,5 @@ index 644e91aed4f..4cb65eec36a 100644 { HWND next = get_window_relative( orig, GW_HWNDNEXT ); -- -2.34.1 +2.43.0 diff --git a/patches/user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch b/patches/user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch index 9ffdbffd..33136844 100644 --- a/patches/user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch +++ b/patches/user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch @@ -1,35 +1,16 @@ -From 0c3e20339d2b531e62819b670b30635af6e75ea0 Mon Sep 17 00:00:00 2001 +From 2b442e1f3c5c13871b30fd8d2269c957c013142f Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 17 May 2017 23:55:55 +0800 Subject: [PATCH] server: Add support for a layered window region. (v3) --- - dlls/user32/tests/input.c | 2 -- dlls/winex11.drv/bitblt.c | 45 +++++++++++++++++++++++++++++++++++++++ server/protocol.def | 7 ++++++ server/window.c | 32 ++++++++++++++++++++++++++++ - 4 files changed, 84 insertions(+), 2 deletions(-) + 3 files changed, 84 insertions(+) -diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c -index 62ff4ad7777..a458e002ca0 100644 ---- a/dlls/user32/tests/input.c -+++ b/dlls/user32/tests/input.c -@@ -3683,13 +3683,11 @@ static void test_Input_mouse(void) - - if (msg.message == WM_LBUTTONDOWN) - { -- todo_wine - ok(msg.hwnd == button_win, "msg.hwnd = %p\n", msg.hwnd); - got_button_down = TRUE; - } - else if (msg.message == WM_LBUTTONUP) - { -- todo_wine - ok(msg.hwnd == button_win, "msg.hwnd = %p\n", msg.hwnd); - got_button_up = TRUE; - break; diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c -index 10388a1cc8f..5ff6e23fa8d 100644 +index 94aa06773a7..feb1a0a46c2 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -48,6 +48,7 @@ @@ -40,7 +21,7 @@ index 10388a1cc8f..5ff6e23fa8d 100644 #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(bitblt); -@@ -1625,6 +1626,48 @@ static inline void add_row( HRGN rgn, RGNDATA *data, int x, int y, int len ) +@@ -1627,6 +1628,48 @@ static inline void add_row( HRGN rgn, RGNDATA *data, int x, int y, int len ) } #endif @@ -89,7 +70,7 @@ index 10388a1cc8f..5ff6e23fa8d 100644 /*********************************************************************** * update_surface_region */ -@@ -1643,6 +1686,7 @@ static void update_surface_region( struct x11drv_window_surface *surface ) +@@ -1645,6 +1688,7 @@ static void update_surface_region( struct x11drv_window_surface *surface ) if (!surface->is_argb && surface->color_key == CLR_INVALID) { XShapeCombineMask( gdi_display, surface->window, ShapeBounding, 0, 0, None, ShapeSet ); @@ -97,7 +78,7 @@ index 10388a1cc8f..5ff6e23fa8d 100644 return; } -@@ -1753,6 +1797,7 @@ static void update_surface_region( struct x11drv_window_surface *surface ) +@@ -1755,6 +1799,7 @@ static void update_surface_region( struct x11drv_window_surface *surface ) free( data ); } @@ -106,10 +87,10 @@ index 10388a1cc8f..5ff6e23fa8d 100644 #endif } diff --git a/server/protocol.def b/server/protocol.def -index 438bbce902b..a4f22aa85de 100644 +index 5d60e7fcda3..bf3f8295c64 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -2503,6 +2503,13 @@ enum coords_relative +@@ -2625,6 +2625,13 @@ enum coords_relative @END @@ -124,7 +105,7 @@ index 438bbce902b..a4f22aa85de 100644 @REQ(get_update_region) user_handle_t window; /* handle to the window */ diff --git a/server/window.c b/server/window.c -index ce1574260b6..34d1e7af979 100644 +index 242e93f303a..970cbab7b8a 100644 --- a/server/window.c +++ b/server/window.c @@ -71,6 +71,7 @@ struct window @@ -135,7 +116,7 @@ index ce1574260b6..34d1e7af979 100644 struct region *update_region; /* update region (relative to window rect) */ unsigned int style; /* window style */ unsigned int ex_style; /* window extended style */ -@@ -561,6 +562,7 @@ static struct window *create_window( struct window *parent, struct window *owner +@@ -564,6 +565,7 @@ static struct window *create_window( struct window *parent, struct window *owner win->atom = atom; win->last_active = win->handle; win->win_region = NULL; @@ -143,7 +124,7 @@ index ce1574260b6..34d1e7af979 100644 win->update_region = NULL; win->style = 0; win->ex_style = 0; -@@ -804,6 +806,9 @@ static int is_point_in_window( struct window *win, int *x, int *y, unsigned int +@@ -822,6 +824,9 @@ static int is_point_in_window( struct window *win, int *x, int *y, unsigned int if (win->win_region && !point_in_region( win->win_region, *x - win->window_rect.left, *y - win->window_rect.top )) return 0; /* not in window region */ @@ -153,7 +134,7 @@ index ce1574260b6..34d1e7af979 100644 return 1; } -@@ -1949,6 +1954,14 @@ static void set_window_region( struct window *win, struct region *region, int re +@@ -1979,6 +1984,14 @@ static void set_window_region( struct window *win, struct region *region, int re } @@ -168,7 +149,7 @@ index ce1574260b6..34d1e7af979 100644 /* destroy a window */ void free_window_handle( struct window *win ) { -@@ -2012,6 +2025,7 @@ void free_window_handle( struct window *win ) +@@ -2042,6 +2055,7 @@ void free_window_handle( struct window *win ) detach_window_thread( win ); if (win->parent) set_parent_window( win, NULL ); @@ -176,7 +157,7 @@ index ce1574260b6..34d1e7af979 100644 free_user_handle( win->handle ); win->handle = 0; release_object( win ); -@@ -2673,6 +2687,24 @@ DECL_HANDLER(set_window_region) +@@ -2699,6 +2713,24 @@ DECL_HANDLER(set_window_region) } @@ -202,5 +183,5 @@ index ce1574260b6..34d1e7af979 100644 DECL_HANDLER(get_update_region) { -- -2.35.1 +2.43.0 diff --git a/patches/user32-Mouse_Message_Hwnd/definition b/patches/user32-Mouse_Message_Hwnd/definition index 3f419964..b8c3370d 100644 --- a/patches/user32-Mouse_Message_Hwnd/definition +++ b/patches/user32-Mouse_Message_Hwnd/definition @@ -1,4 +1,3 @@ Fixes: [22458] Fix issues with inserting symbols by clicking on center in Word 2007 & 2010 Fixes: [12007] Fix issues with dragging layers between images in Adobe Photoshop 7.0 Fixes: [9512] Make sure popups don't block access to objects underneath in DVDPro -Disabled: true diff --git a/patches/user32-Mouse_Message_Hwnd/0004-user32-tests-Add-tests-for-DC-region.patch b/patches/user32-Mouse_Message_Hwnd/xxx4-user32-tests-Add-tests-for-DC-region.patch similarity index 100% rename from patches/user32-Mouse_Message_Hwnd/0004-user32-tests-Add-tests-for-DC-region.patch rename to patches/user32-Mouse_Message_Hwnd/xxx4-user32-tests-Add-tests-for-DC-region.patch