wine-staging/patches/user32-rawinput/0005-server-Don-t-emulate-rawinput-mouse-events-if-native.patch
2019-09-25 14:26:05 +10:00

46 lines
1.6 KiB
Diff

From d7343cb3d9c68873003bbf92315dad23808221c4 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dereklesho52@Gmail.com>
Date: Tue, 25 Jun 2019 21:58:34 -0400
Subject: [PATCH 05/11] server: Don't emulate rawinput mouse events if native
exist.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
---
server/queue.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server/queue.c b/server/queue.c
index 246fcffd23..c9446f7f4b 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1599,6 +1599,8 @@ static int send_hook_ll_message( struct desktop *desktop, struct message *hardwa
return 1;
}
+static int emulate_raw_mouse = 1;
+
/* 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 )
@@ -1664,7 +1666,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop->cursor.y;
}
- if ((device = current->process->rawinput_mouse))
+ device = current->process->rawinput_mouse;
+ if (device && emulate_raw_mouse)
{
if (!(msg = alloc_hardware_message( input->mouse.info, source, time ))) return 0;
msg_data = msg->data;
@@ -2435,6 +2438,7 @@ DECL_HANDLER(send_rawinput_message)
switch (req->input.type)
{
case RIM_TYPEMOUSE:
+ emulate_raw_mouse = 0;
if ((device = current->process->rawinput_mouse))
{
struct thread *thread = device->target ? get_window_thread( device->target ) : NULL;
--
2.23.0