This patch had to be updated as I didn't account for mouse messages sent from set_cursor_pos.
On Sat, Jun 29, 2019 at 10:26 PM Derek Lesho dereklesho52@gmail.com wrote:
Signed-off-by: Derek Lesho dereklesho52@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 2085fd3f9f..120de073c8 100644 --- a/dlls/user32/rawinput.c +++ b/dlls/user32/rawinput.c @@ -250,7 +250,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 24239916af..0ab5adfead 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;
@@ -1668,6 +1671,9 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons msg_data->rawinput.mouse.data = input->mouse.data;
queue_hardware_message( desktop, msg, 0 );
if (device->flags & RIDEV_NOLEGACY)
return FALSE;
}
for (i = 0; i < ARRAY_SIZE( messages ); i++)
@@ -1793,6 +1799,9 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c msg_data->rawinput.kbd.scan = input->kbd.scan;
queue_hardware_message( desktop, msg, 0 );
if (device->flags & RIDEV_NOLEGACY)
return FALSE;
}
if (!(msg = alloc_hardware_message( input->kbd.info, source, time
))) return 0;
2.21.0