Rebase against 8c64979dcb2673659adacf39733e24d42b7fc01d.

This commit is contained in:
Alistair Leslie-Hughes 2024-06-21 09:04:02 +10:00
parent 995b17c208
commit bc1a2b81d6
4 changed files with 250 additions and 178 deletions

View File

@ -1,17 +1,17 @@
From 22d786152100f510a69cf9a2153638c47af7f017 Mon Sep 17 00:00:00 2001
From f54dd14cd76979c7ada4b6aaa9869ae7ff741940 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Fri, 8 Mar 2024 10:48:31 +0100
Subject: [PATCH 1/7] server: Add support for absolute rawinput mouse messages.
Subject: [PATCH] server: Add support for absolute rawinput mouse messages.
---
server/queue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index 0e8653bedf0..67c03c10b40 100644
index 3e49897988f..cece12066fc 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1811,7 +1811,9 @@ static void rawmouse_init( struct rawinput *header, RAWMOUSE *rawmouse, int x, i
@@ -1859,7 +1859,9 @@ static void rawmouse_init( struct rawinput *header, RAWMOUSE *rawmouse, int x, i
header->wparam = 0;
header->usage = MAKELONG(HID_USAGE_GENERIC_MOUSE, HID_USAGE_PAGE_GENERIC);
@ -22,11 +22,11 @@ index 0e8653bedf0..67c03c10b40 100644
rawmouse->usButtonFlags = 0;
rawmouse->usButtonData = 0;
for (i = 1; i < ARRAY_SIZE(button_flags); ++i)
@@ -2044,7 +2046,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2098,7 +2100,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
raw_msg.time = time;
raw_msg.message = WM_INPUT;
raw_msg.flags = flags;
- rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, x - desktop->cursor.x, y - desktop->cursor.y,
- rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, x - desktop_shm->cursor.x, y - desktop_shm->cursor.y,
+ rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, input->mouse.x, input->mouse.y,
raw_msg.flags, input->mouse.data, input->mouse.info );

View File

@ -1,4 +1,4 @@
From e51d13c759303fd7a903d784ebf8e9a42e2955b6 Mon Sep 17 00:00:00 2001
From 0dae85eba564b06274760c085652908727e3b2e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 14:37:20 +0200
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
@ -11,10 +11,10 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/include/ntuser.h b/include/ntuser.h
index 507ed2e47ec..33e99f1084e 100644
index bd11567290f..c75e691b4ee 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -1478,6 +1478,10 @@ struct hid_packet
@@ -1480,6 +1480,10 @@ struct hid_packet
C_ASSERT(sizeof(struct hid_packet) == offsetof(struct hid_packet, data[0]));
@ -26,10 +26,10 @@ index 507ed2e47ec..33e99f1084e 100644
{
UINT flags;
diff --git a/server/protocol.def b/server/protocol.def
index c3fab5e65ba..fc686f1254e 100644
index dc77ecec15b..e4e632dcf23 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2164,7 +2164,7 @@ enum message_type
@@ -2206,7 +2206,7 @@ enum message_type
@REQ(send_hardware_message)
user_handle_t win; /* window handle */
hw_input_t input; /* input data */
@ -38,7 +38,7 @@ index c3fab5e65ba..fc686f1254e 100644
VARARG(report,bytes); /* HID report data */
@REPLY
int wait; /* do we need to wait for a reply? */
@@ -2173,7 +2173,6 @@ enum message_type
@@ -2215,7 +2215,6 @@ enum message_type
int new_x; /* new cursor position */
int new_y;
@END
@ -47,20 +47,20 @@ index c3fab5e65ba..fc686f1254e 100644
/* Get a message from the current queue */
diff --git a/server/queue.c b/server/queue.c
index 7a721877a6f..a220baa1f92 100644
index cece12066fc..c423b9ad8c4 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2020,7 +2020,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_
@@ -2031,7 +2031,7 @@ 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,
- unsigned int origin, struct msg_queue *sender )
+ 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;
struct rawinput_message raw_msg;
@@ -2075,7 +2075,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop->cursor.y;
@@ -2092,7 +2092,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop_shm->cursor.y;
}
- if ((foreground = get_foreground_thread( desktop, win )))
@ -68,7 +68,7 @@ index 7a721877a6f..a220baa1f92 100644
{
memset( &raw_msg, 0, sizeof(raw_msg) );
raw_msg.foreground = foreground;
@@ -2090,6 +2090,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2107,6 +2107,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
release_object( foreground );
}
@ -77,7 +77,7 @@ index 7a721877a6f..a220baa1f92 100644
for (i = 0; i < ARRAY_SIZE( messages ); i++)
{
if (!messages[i]) continue;
@@ -2120,14 +2122,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2137,14 +2139,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
}
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
@ -94,7 +94,7 @@ index 7a721877a6f..a220baa1f92 100644
}
static void stop_key_repeat( struct desktop *desktop )
@@ -2140,7 +2142,7 @@ static void stop_key_repeat( struct desktop *desktop )
@@ -2157,7 +2159,7 @@ 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,
@ -103,7 +103,7 @@ index 7a721877a6f..a220baa1f92 100644
{
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
struct hardware_msg_data *msg_data;
@@ -2263,7 +2265,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2280,7 +2282,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
}
}
@ -112,7 +112,7 @@ index 7a721877a6f..a220baa1f92 100644
{
struct rawinput_message raw_msg = {0};
raw_msg.foreground = foreground;
@@ -2278,6 +2280,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2295,6 +2297,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
release_object( foreground );
}
@ -121,7 +121,7 @@ index 7a721877a6f..a220baa1f92 100644
if (!(msg = alloc_hardware_message( input->kbd.info, source, time, 0 ))) return 0;
msg_data = msg->data;
@@ -3029,10 +3033,10 @@ DECL_HANDLER(send_hardware_message)
@@ -3050,10 +3054,10 @@ DECL_HANDLER(send_hardware_message)
switch (req->input.type)
{
case INPUT_MOUSE:

View File

@ -1 +1 @@
96d294aa123497d3c5b0611d9de4787e3eb7fc6a
8c64979dcb2673659adacf39733e24d42b7fc01d