You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against eeabbe812ffc3ed7c06fc85cd63f0d85bffe207e.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 8e45c14f92426d1a9610ef21f0f3223b7276b13f Mon Sep 17 00:00:00 2001
|
||||
From cd57704c5a232a8ed0beb3b951fb0b4a06d28b43 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 b596ec546b4..59fbd2bbe52 100644
|
||||
index 43df1408f39..6b0fb873fad 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@ -52,7 +52,7 @@ index b596ec546b4..59fbd2bbe52 100644
|
||||
|
||||
thread_data->x_valuator.value = 0;
|
||||
thread_data->y_valuator.value = 0;
|
||||
@@ -1669,6 +1680,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1667,6 +1678,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 b596ec546b4..59fbd2bbe52 100644
|
||||
double x_value = 0, y_value = 0, x_scale, y_scale;
|
||||
const double *values = event->valuators.values;
|
||||
RECT virtual_rect;
|
||||
@@ -1679,7 +1691,15 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1677,7 +1689,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( MDT_DEFAULT );
|
||||
- virtual_rect = NtUserGetVirtualScreenRect( MDT_RAW_DPI );
|
||||
+ 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 b596ec546b4..59fbd2bbe52 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( MDT_DEFAULT );
|
||||
+ else virtual_rect = NtUserGetVirtualScreenRect( MDT_RAW_DPI );
|
||||
|
||||
if (x->max <= x->min) x_scale = 1;
|
||||
else x_scale = (virtual_rect.right - virtual_rect.left) / (x->max - x->min);
|
||||
@@ -1692,17 +1712,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1690,17 +1710,26 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
if (i == x->number)
|
||||
{
|
||||
x_value = *values;
|
||||
|
Reference in New Issue
Block a user