[RFC PATCH 4/8] user32: Add support for RIDEV_NOLEGACY flag.
Rémi Bernon
rbernon at codeweavers.com
Wed Sep 11 09:30:07 CDT 2019
From: Derek Lesho <dereklesho52 at Gmail.com>
---
dlls/user32/rawinput.c | 2 +-
server/queue.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index a8409666f17..66dc9b55f12 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -282,7 +282,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(RAWINPUTDEVICE *devices, U
TRACE("device %u: page %#x, usage %#x, flags %#x, target %p.\n",
i, devices[i].usUsagePage, devices[i].usUsage,
devices[i].dwFlags, devices[i].hwndTarget);
- if (devices[i].dwFlags & ~RIDEV_REMOVE)
+ if (devices[i].dwFlags & ~(RIDEV_REMOVE|RIDEV_NOLEGACY))
FIXME("Unhandled flags %#x for device %u.\n", devices[i].dwFlags, i);
d[i].usage_page = devices[i].usUsagePage;
diff --git a/server/queue.c b/server/queue.c
index 5f8b82c864c..31b643d4c96 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -372,6 +372,9 @@ static void set_cursor_pos( struct desktop *desktop, int x, int y )
static const struct hw_msg_source source = { IMDT_UNAVAILABLE, IMO_SYSTEM };
struct message *msg;
+ if (current->process->rawinput_mouse &&
+ current->process->rawinput_mouse->flags & RIDEV_NOLEGACY) return;
+
if (!(msg = alloc_hardware_message( 0, source, get_tick_count() ))) return;
msg->msg = WM_MOUSEMOVE;
@@ -1642,6 +1645,7 @@ done:
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 req_flags )
{
+ const struct rawinput_device *device;
struct hardware_msg_data *msg_data;
struct raw_input_message raw_msg;
struct message *msg;
@@ -1715,6 +1719,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
if (req_flags & SEND_HWMSG_ONLY_RAW)
return 0;
+ if ((device = current->process->rawinput_mouse) && (device->flags & RIDEV_NOLEGACY))
+ return 0;
for (i = 0; i < ARRAY_SIZE( messages ); i++)
{
@@ -1750,6 +1756,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
unsigned int origin, struct msg_queue *sender, unsigned int req_flags )
{
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
+ const struct rawinput_device *device;
struct hardware_msg_data *msg_data;
struct raw_input_message raw_msg;
struct message *msg;
@@ -1845,6 +1852,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
if (req_flags & SEND_HWMSG_ONLY_RAW)
return 0;
+ if ((device = current->process->rawinput_kbd) && (device->flags & RIDEV_NOLEGACY))
+ return 0;
if (!(msg = alloc_hardware_message( input->kbd.info, source, time ))) return 0;
msg_data = msg->data;
--
2.23.0
More information about the wine-devel
mailing list