From ef36ee439903308234436f17f3b829d382a090d8 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 3 Oct 2024 12:53:12 +1000 Subject: [PATCH] Rebase against 7c1fbc40b7ed0b9b1f2c96b99a592530eadae14f. --- ...upport-for-absolute-position-in-RawMoti.patch | 16 ++++++++-------- staging/upstream-commit | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/patches/user32-rawinput-mouse/0003-winex11-Add-support-for-absolute-position-in-RawMoti.patch b/patches/user32-rawinput-mouse/0003-winex11-Add-support-for-absolute-position-in-RawMoti.patch index 8ccfb4bd..e6e86788 100644 --- a/patches/user32-rawinput-mouse/0003-winex11-Add-support-for-absolute-position-in-RawMoti.patch +++ b/patches/user32-rawinput-mouse/0003-winex11-Add-support-for-absolute-position-in-RawMoti.patch @@ -1,4 +1,4 @@ -From d3a25a9ead93caf3d25ad34591683675b3d1ae0b Mon Sep 17 00:00:00 2001 +From 8e45c14f92426d1a9610ef21f0f3223b7276b13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Fri, 8 Mar 2024 11:15:57 +0100 Subject: [PATCH] winex11: Add support for absolute position in RawMotion @@ -9,7 +9,7 @@ Subject: [PATCH] winex11: Add support for absolute position in RawMotion 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 45619d4970d..d3c97468fdb 100644 +index b596ec546b4..59fbd2bbe52 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -30,6 +30,7 @@ @@ -52,7 +52,7 @@ index 45619d4970d..d3c97468fdb 100644 thread_data->x_valuator.value = 0; thread_data->y_valuator.value = 0; -@@ -1670,6 +1681,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1669,6 +1680,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) { struct x11drv_thread_data *thread_data = x11drv_thread_data(); XIValuatorClassInfo *x = &thread_data->x_valuator, *y = &thread_data->y_valuator; @@ -60,11 +60,11 @@ index 45619d4970d..d3c97468fdb 100644 double x_value = 0, y_value = 0, x_scale, y_scale; const double *values = event->valuators.values; RECT virtual_rect; -@@ -1680,7 +1692,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1679,7 +1691,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) if (!xinput2_available) return FALSE; if (event->deviceid != thread_data->xinput2_pointer) return FALSE; -- virtual_rect = NtUserGetVirtualScreenRect(); +- virtual_rect = NtUserGetVirtualScreenRect( MDT_DEFAULT ); + if (x->mode == XIModeRelative && y->mode == XIModeRelative) + input->mi.dwFlags &= ~absolute_flags; + else if (x->mode == XIModeAbsolute && y->mode == XIModeAbsolute) @@ -73,11 +73,11 @@ index 45619d4970d..d3c97468fdb 100644 + FIXME( "Unsupported relative/absolute X/Y axis mismatch\n." ); + + if (input->mi.dwFlags & MOUSEEVENTF_VIRTUALDESK) SetRect( &virtual_rect, 0, 0, UINT16_MAX, UINT16_MAX ); -+ else virtual_rect = NtUserGetVirtualScreenRect(); ++ else virtual_rect = NtUserGetVirtualScreenRect( MDT_DEFAULT ); if (x->max <= x->min) x_scale = 1; else x_scale = (virtual_rect.right - virtual_rect.left) / (x->max - x->min); -@@ -1693,17 +1713,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1692,17 +1712,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) if (i == x->number) { x_value = *values; @@ -108,5 +108,5 @@ index 45619d4970d..d3c97468fdb 100644 TRACE( "event %f,%f value %f,%f, accumulating motion\n", x_value, y_value, x->value, y->value ); input->mi.dwFlags &= ~MOUSEEVENTF_MOVE; -- -2.43.0 +2.45.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index 0bd20730..d4969ffa 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -b6196159becb194a56434061fe3bba239863b783 +7c1fbc40b7ed0b9b1f2c96b99a592530eadae14f