Updated user32-rawinput-mouse-experimental patchset

This commit is contained in:
Alistair Leslie-Hughes 2021-10-29 21:37:16 +11:00
parent c9c7130f3c
commit 56fd61a713
6 changed files with 29 additions and 19 deletions

View File

@ -1,8 +1,7 @@
From e158845b33737d5b9524a668683e477fd4283b9f Mon Sep 17 00:00:00 2001
From a2742b14c1f5e0749a24e105131345428840a12f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 28 Oct 2021 09:11:02 +0200
Subject: [PATCH 1/6] server: Clear the MOUSEEVENTF_(ABSOLUTE|VIRTUALDESK)
flags.
Subject: [PATCH] server: Clear the MOUSEEVENTF_(ABSOLUTE|VIRTUALDESK) flags.
For rawinput messages, as user32 is currently only expecting relative
motion.

View File

@ -1,7 +1,7 @@
From 0785a15e720e552f65140f69ca40bac7e503dca1 Mon Sep 17 00:00:00 2001
From 3fde11e2e3cf70b4815d88283ec0947c019c5424 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 25 Oct 2021 11:26:43 +0200
Subject: [PATCH 2/6] user32: Add support for absolute rawinput messages.
Subject: [PATCH] user32: Add support for absolute rawinput messages.
---
dlls/user32/rawinput.c | 4 +++-

View File

@ -1,7 +1,7 @@
From 8a34dbf24db2f4b11421889770732c2b65ebca3a Mon Sep 17 00:00:00 2001
From a28f1031effa8319f580dab6392709e5a9944d07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 25 Oct 2021 11:22:04 +0200
Subject: [PATCH 3/6] server: Stop enforcing relative rawinput mouse positions.
Subject: [PATCH] server: Stop enforcing relative rawinput mouse positions.
---
server/queue.c | 6 +++---

View File

@ -1,7 +1,7 @@
From 7fee08463639411efb2b53d7abee8e064afae2b1 Mon Sep 17 00:00:00 2001
From 075b66ed9d322209d48cc607f70c831ac5c9bdab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Sun, 24 Oct 2021 16:27:40 +0200
Subject: [PATCH 4/6] winex11.drv: Simplify XInput2 valuator lookup.
Subject: [PATCH] winex11.drv: Simplify XInput2 valuator lookup.
Valuator names aren't well specified, and although they usually are
Rel X/Y or Abs X/Y, there are cases where the X/Y names are something

View File

@ -1,7 +1,7 @@
From 852b1ef2128c34471f4fc6eaffa32f30a0c05b67 Mon Sep 17 00:00:00 2001
From 0f6a1e69470980663ec359edadcbf2083ac56efc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 28 Oct 2021 09:18:37 +0200
Subject: [PATCH 5/6] winex11.drv: Add support for absolute RawMotion events.
Subject: [PATCH] winex11.drv: Add support for absolute RawMotion events.
---
dlls/winex11.drv/mouse.c | 28 ++++++++++++++++++++++------

View File

@ -1,7 +1,7 @@
From b3d438135587b09803599f4df3b08bc7379546bc Mon Sep 17 00:00:00 2001
From df55865a000b3443f1948cdb8449cd33e049840b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 25 Oct 2021 11:48:00 +0200
Subject: [PATCH 6/6] winex11.drv: Send relative RawMotion events unprocessed.
Subject: [PATCH] winex11.drv: Send relative RawMotion events unprocessed.
This makes relative raw input independent from cursor speed, as it is
the case on Windows. Absolute raw input is already translated to
@ -9,11 +9,11 @@ virtual desktop space, and cursor speed is meaningless in this case.
This does not support mixed relative/absolute X/Y axis.
---
dlls/winex11.drv/mouse.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
dlls/winex11.drv/mouse.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index e6a2266855a..62a80ea6300 100644
index e6a2266855a..ea561811097 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -750,12 +750,12 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x
@ -32,7 +32,7 @@ index e6a2266855a..62a80ea6300 100644
RECT virtual_rect;
int i;
@@ -784,22 +784,30 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
@@ -784,33 +784,35 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
if (!XIMaskIsSet( event->valuators.mask, i )) continue;
if (i == x->number)
{
@ -63,7 +63,18 @@ index e6a2266855a..62a80ea6300 100644
TRACE( "event %f,%f value %f,%f input %d,%d\n", x_value, y_value, x->value, y->value, input->u.mi.dx, input->u.mi.dy );
x->value -= input->u.mi.dx;
@@ -2025,7 +2033,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
y->value -= input->u.mi.dy;
- if (!(input->u.mi.dwFlags & MOUSEEVENTF_ABSOLUTE) && !input->u.mi.dx && !input->u.mi.dy)
- {
- TRACE( "accumulating motion\n" );
- return FALSE;
- }
-
return TRUE;
}
@@ -2025,7 +2027,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
input.u.mi.dwExtraInfo = 0;
input.u.mi.dx = 0;
input.u.mi.dy = 0;
@ -72,7 +83,7 @@ index e6a2266855a..62a80ea6300 100644
if (!thread_data->xi2_rawinput_only)
__wine_send_input( 0, &input, NULL );
@@ -2039,8 +2047,6 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -2039,8 +2041,6 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
rawinput.data.mouse.ulRawButtons = 0;
rawinput.data.mouse.u.usButtonData = 0;
rawinput.data.mouse.u.usButtonFlags = 0;