Rebase against 7c1fbc40b7ed0b9b1f2c96b99a592530eadae14f.

This commit is contained in:
Alistair Leslie-Hughes 2024-10-03 12:53:12 +10:00
parent 3dfacea342
commit ef36ee4399
2 changed files with 9 additions and 9 deletions

View File

@ -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?= <rbernon@codeweavers.com>
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

View File

@ -1 +1 @@
b6196159becb194a56434061fe3bba239863b783
7c1fbc40b7ed0b9b1f2c96b99a592530eadae14f