From 78f630993bc4b9ac88e1f38098e56d9da5142544 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 19 Nov 2024 09:46:47 +1100 Subject: [PATCH] Rebase against 67c1c3c2559cc3b934cae5ae26156dcc6fbd484b. --- ...ement-NtSignalAndWaitForSingleObject.patch | 14 ++--- ...hardware_message-flags-for-rawinput-.patch | 54 +++++++++++-------- staging/upstream-commit | 2 +- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/patches/eventfd_synchronization/0028-ntdll-Implement-NtSignalAndWaitForSingleObject.patch b/patches/eventfd_synchronization/0028-ntdll-Implement-NtSignalAndWaitForSingleObject.patch index 3032aac8..11b5850f 100644 --- a/patches/eventfd_synchronization/0028-ntdll-Implement-NtSignalAndWaitForSingleObject.patch +++ b/patches/eventfd_synchronization/0028-ntdll-Implement-NtSignalAndWaitForSingleObject.patch @@ -1,4 +1,4 @@ -From 622de4743d9585d895bb560b4c8ac6ab01aff23f Mon Sep 17 00:00:00 2001 +From 631ec6bff81bb2e3389d0c2030364dea91719bf6 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 6 Jul 2020 16:52:39 -0500 Subject: [PATCH] ntdll: Implement NtSignalAndWaitForSingleObject(). @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement NtSignalAndWaitForSingleObject(). 3 files changed, 33 insertions(+) diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c -index 9e980643a6e..db70e5075d1 100644 +index 6d07d8057a1..ca0ffd2b8b1 100644 --- a/dlls/ntdll/unix/esync.c +++ b/dlls/ntdll/unix/esync.c -@@ -842,6 +842,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an +@@ -844,6 +844,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an return ret; } @@ -62,11 +62,11 @@ index 8eaa79a5823..88a6d5c8975 100644 /* We have to synchronize on the fd cache mutex so that our calls to receive_fd diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c -index 20391617e40..12ed44f7a8e 100644 +index 943ba6c0da9..51fca406a4c 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c -@@ -1531,6 +1531,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait, - select_op_t select_op; +@@ -1636,6 +1636,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait, + union select_op select_op; UINT flags = SELECT_INTERRUPTIBLE; + if (do_esync()) @@ -76,5 +76,5 @@ index 20391617e40..12ed44f7a8e 100644 if (alertable) flags |= SELECT_ALERTABLE; -- -2.42.0 +2.45.2 diff --git a/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch b/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch index 26190c88..8f144346 100644 --- a/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch +++ b/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch @@ -1,4 +1,4 @@ -From 48124df7efbda048d841899cc9bde77a3684622b Mon Sep 17 00:00:00 2001 +From 2c353379e4e6da08174cc6bc7b0fd95f26c2d16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 26 Aug 2019 14:37:20 +0200 Subject: [PATCH] server: Add send_hardware_message flags for rawinput @@ -6,15 +6,15 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput --- include/ntuser.h | 4 ++++ - server/protocol.def | 3 +-- - server/queue.c | 20 ++++++++++++-------- - 3 files changed, 17 insertions(+), 10 deletions(-) + server/protocol.def | 5 ++--- + server/queue.c | 26 +++++++++++++++----------- + 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/ntuser.h b/include/ntuser.h -index bd11567290f..c75e691b4ee 100644 +index 3d981927395..f20945f4122 100644 --- a/include/ntuser.h +++ b/include/ntuser.h -@@ -1480,6 +1480,10 @@ struct hid_packet +@@ -1613,6 +1613,10 @@ struct hid_packet C_ASSERT(sizeof(struct hid_packet) == offsetof(struct hid_packet, data[0])); @@ -26,19 +26,21 @@ index bd11567290f..c75e691b4ee 100644 { UINT flags; diff --git a/server/protocol.def b/server/protocol.def -index 222a283477a..320b87775b7 100644 +index ae53a65db64..1fcace0d131 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -2208,7 +2208,7 @@ enum message_type +@@ -2262,8 +2262,8 @@ enum message_type + /* Send a hardware message to a thread queue */ @REQ(send_hardware_message) user_handle_t win; /* window handle */ - hw_input_t input; /* input data */ +- union hw_input input; /* input data */ - unsigned int flags; /* flags (see below) */ ++ union hw_input input; /* input data */ + unsigned int flags; /* flags (see ntuser.h) */ VARARG(report,bytes); /* HID report data */ @REPLY int wait; /* do we need to wait for a reply? */ -@@ -2217,7 +2217,6 @@ enum message_type +@@ -2272,7 +2272,6 @@ enum message_type int new_x; /* new cursor position */ int new_y; @END @@ -47,19 +49,21 @@ index 222a283477a..320b87775b7 100644 /* Get a message from the current queue */ diff --git a/server/queue.c b/server/queue.c -index 784443ce955..0db4faab193 100644 +index 94169a57db6..9695eceff28 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -2056,7 +2056,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_ +@@ -2243,8 +2243,8 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_ + } /* queue a hardware message for a mouse event */ - static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, +-static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, - unsigned int origin, struct msg_queue *sender ) ++static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, + unsigned int origin, struct msg_queue *sender, unsigned int send_flags ) { const desktop_shm_t *desktop_shm = desktop->shared; struct hardware_msg_data *msg_data; -@@ -2117,7 +2117,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2305,7 +2305,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons y = desktop_shm->cursor.y; } @@ -68,7 +72,7 @@ index 784443ce955..0db4faab193 100644 { memset( &raw_msg, 0, sizeof(raw_msg) ); raw_msg.foreground = foreground; -@@ -2132,6 +2132,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2320,6 +2320,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons release_object( foreground ); } @@ -77,11 +81,13 @@ index 784443ce955..0db4faab193 100644 for (i = 0; i < ARRAY_SIZE( messages ); i++) { if (!messages[i]) continue; -@@ -2162,14 +2164,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2349,15 +2351,15 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons + return wait; } - static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, +-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, - unsigned int origin, struct msg_queue *sender, int repeat ); ++static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, + unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags); static void key_repeat_timeout( void *private ) @@ -94,16 +100,18 @@ index 784443ce955..0db4faab193 100644 } static void stop_key_repeat( struct desktop *desktop ) -@@ -2182,7 +2184,7 @@ static void stop_key_repeat( struct desktop *desktop ) +@@ -2369,8 +2371,8 @@ static void stop_key_repeat( struct desktop *desktop ) + } /* queue a hardware message for a keyboard event */ - static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, +-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, - unsigned int origin, struct msg_queue *sender, int repeat ) ++static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input, + unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags ) { const desktop_shm_t *desktop_shm = desktop->shared; struct hw_msg_source source = { IMDT_KEYBOARD, origin }; -@@ -2305,7 +2307,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c +@@ -2493,7 +2495,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c } } @@ -112,7 +120,7 @@ index 784443ce955..0db4faab193 100644 { struct rawinput_message raw_msg = {0}; raw_msg.foreground = foreground; -@@ -2320,6 +2322,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c +@@ -2508,6 +2510,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c release_object( foreground ); } @@ -121,7 +129,7 @@ index 784443ce955..0db4faab193 100644 if (!(msg = alloc_hardware_message( input->kbd.info, source, time, 0 ))) return 0; msg_data = msg->data; -@@ -3075,10 +3079,10 @@ DECL_HANDLER(send_hardware_message) +@@ -3294,10 +3298,10 @@ DECL_HANDLER(send_hardware_message) switch (req->input.type) { case INPUT_MOUSE: @@ -135,5 +143,5 @@ index 784443ce955..0db4faab193 100644 case INPUT_HARDWARE: queue_custom_hardware_message( desktop, req->win, origin, &req->input ); -- -2.43.0 +2.45.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index a937908c..cd9c1fb9 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -ab40b7fd8686345bf77a27ceb12d4dfbaa753829 +67c1c3c2559cc3b934cae5ae26156dcc6fbd484b