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
Updated user32-rawinput-mouse patchset
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From be00910ebbb1277a5e34e982450a20821757fa25 Mon Sep 17 00:00:00 2001
|
||||
From b4d1ea44dd7f2201ba7d02eb171ee2ddb4013fe5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 17 Jan 2020 16:33:11 +0100
|
||||
Subject: [PATCH] winex11.drv: Split XInput2 thread initialization.
|
||||
Subject: [PATCH 1/8] winex11.drv: Split XInput2 thread initialization.
|
||||
|
||||
And rename the library and function loader to x11drv_xinput_load.
|
||||
---
|
||||
@@ -11,10 +11,10 @@ And rename the library and function loader to x11drv_xinput_load.
|
||||
3 files changed, 36 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 42bac332664..ce77c7e5985 100644
|
||||
index 8cc30f0736d..a299944613e 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -286,6 +286,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
|
||||
@@ -279,6 +279,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ index 42bac332664..ce77c7e5985 100644
|
||||
/***********************************************************************
|
||||
* enable_xinput2
|
||||
*/
|
||||
@@ -298,19 +324,9 @@ static void enable_xinput2(void)
|
||||
@@ -291,19 +317,9 @@ static void enable_xinput2(void)
|
||||
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
|
||||
int count;
|
||||
|
||||
@@ -69,7 +69,7 @@ index 42bac332664..ce77c7e5985 100644
|
||||
if (!pXIGetClientPointer( data->display, None, &data->xi2_core_pointer )) return;
|
||||
|
||||
mask.mask = mask_bits;
|
||||
@@ -350,9 +366,9 @@ static void disable_xinput2(void)
|
||||
@@ -343,9 +359,9 @@ static void disable_xinput2(void)
|
||||
struct x11drv_thread_data *data = x11drv_thread_data();
|
||||
XIEventMask mask;
|
||||
|
||||
@@ -80,7 +80,7 @@ index 42bac332664..ce77c7e5985 100644
|
||||
data->xi2_state = xi_disabled;
|
||||
|
||||
mask.mask = NULL;
|
||||
@@ -1908,9 +1924,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
@@ -1919,9 +1935,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
@@ -93,10 +93,10 @@ index 42bac332664..ce77c7e5985 100644
|
||||
#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H)
|
||||
int event, error;
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index c23cd512eb9..a46d9ef430c 100644
|
||||
index d384a8a68c0..2f14c3f7cea 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -195,7 +195,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
|
||||
@@ -196,7 +196,8 @@ extern BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
|
||||
/* X11 driver internal functions */
|
||||
|
||||
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
|
||||
@@ -107,10 +107,10 @@ index c23cd512eb9..a46d9ef430c 100644
|
||||
extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image,
|
||||
const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits,
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index 9ec4c7a98f6..43c30ab369c 100644
|
||||
index bd21afc8174..98f57383bc2 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -610,7 +610,7 @@ static BOOL process_attach(void)
|
||||
@@ -623,7 +623,7 @@ static BOOL process_attach(void)
|
||||
#ifdef SONAME_LIBXCOMPOSITE
|
||||
X11DRV_XComposite_Init();
|
||||
#endif
|
||||
@@ -119,7 +119,7 @@ index 9ec4c7a98f6..43c30ab369c 100644
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
|
||||
@@ -702,6 +702,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
|
||||
@@ -716,6 +716,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
|
||||
|
||||
if (use_xim) X11DRV_SetupXIM();
|
||||
|
||||
@@ -129,5 +129,5 @@ index 9ec4c7a98f6..43c30ab369c 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
From 1632472dc5c87c67bdff91758c190925a910d985 Mon Sep 17 00:00:00 2001
|
||||
From ad9aab54712604c45c75262b7f7a984bc1a756cd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 23 Jan 2020 11:00:19 +0100
|
||||
Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows.
|
||||
Subject: [PATCH 2/8] winex11.drv: Support XInput2 events for individual
|
||||
windows.
|
||||
|
||||
This will allow us to listen to the XInput version of several events,
|
||||
which can bring additional information.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From fa0f68c400a4637a00ae4ef2c354a6fbdc92bc0d Mon Sep 17 00:00:00 2001
|
||||
From 7443945f500e43f507267dddd900356b8c06223e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 2 Aug 2019 02:24:32 -0400
|
||||
Subject: [PATCH] winex11.drv: Advertise XInput2 version 2.1 support.
|
||||
Date: Sun, 24 Oct 2021 22:30:56 +0200
|
||||
Subject: [PATCH 3/8] winex11.drv: Advertise XInput2 version 2.1 support.
|
||||
|
||||
Under XInput2 protocol version < 2.1, RawEvents are not supposed to be
|
||||
sent if a pointer grab is active. However slave device events are still
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 29097b205bc5d0861d14409988da04880626b879 Mon Sep 17 00:00:00 2001
|
||||
From 36e0b9f5b0b0ecb9de225dd3b1f092c99a1837f4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 19 Dec 2019 22:34:44 +0100
|
||||
Subject: [PATCH] winex11.drv: Keep track of pointer and device button
|
||||
Subject: [PATCH 4/8] winex11.drv: Keep track of pointer and device button
|
||||
mappings.
|
||||
|
||||
We are going to receive raw button events and we will need to apply the
|
||||
@@ -16,7 +16,7 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
|
||||
4 files changed, 106 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index d86f418a64e..f905794b23a 100644
|
||||
index c6eab6f5cfa..1525dac8280 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1882,13 +1882,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
@@ -51,10 +51,10 @@ index d86f418a64e..f905794b23a 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
index 9088aada596..6905d0827f8 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -25,6 +25,9 @@
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <stdarg.h>
|
||||
@@ -64,7 +64,7 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#endif
|
||||
@@ -142,6 +145,14 @@ MAKE_FUNCPTR(XISelectEvents);
|
||||
@@ -144,6 +147,14 @@ MAKE_FUNCPTR(XISelectEvents);
|
||||
#undef MAKE_FUNCPTR
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
/***********************************************************************
|
||||
* X11DRV_Xcursor_Init
|
||||
*
|
||||
@@ -247,6 +258,70 @@ void sync_window_cursor( Window window )
|
||||
@@ -249,6 +260,70 @@ void sync_window_cursor( Window window )
|
||||
set_window_cursor( window, cursor );
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
/***********************************************************************
|
||||
* update_relative_valuators
|
||||
@@ -1847,6 +1922,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
@@ -1896,6 +1971,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
if (event->reason != XISlaveSwitch) return FALSE;
|
||||
|
||||
update_relative_valuators( event->classes, event->num_classes );
|
||||
@@ -159,7 +159,7 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1916,13 +1993,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
@@ -1928,13 +2005,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
|
||||
#endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */
|
||||
|
||||
@@ -174,7 +174,7 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
int event, error;
|
||||
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
|
||||
|
||||
@@ -1938,11 +2014,20 @@ void x11drv_xinput_load(void)
|
||||
@@ -1950,11 +2026,20 @@ void x11drv_xinput_load(void)
|
||||
return; \
|
||||
}
|
||||
|
||||
@@ -196,10 +196,10 @@ index 0d41438c5c7..fc5fd29d7b6 100644
|
||||
|
||||
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index b7c876e35fe..7a89a010395 100644
|
||||
index 463c2027077..f7af7f346e5 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -643,6 +643,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
|
||||
@@ -642,6 +642,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
|
||||
extern void move_resize_window( HWND hwnd, int dir ) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
|
||||
@@ -208,10 +208,10 @@ index b7c876e35fe..7a89a010395 100644
|
||||
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index 43c30ab369c..d8576949aea 100644
|
||||
index 98f57383bc2..2a35a6a8548 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -616,6 +616,7 @@ static BOOL process_attach(void)
|
||||
@@ -629,6 +629,7 @@ static BOOL process_attach(void)
|
||||
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
|
||||
#endif
|
||||
X11DRV_InitKeyboard( gdi_display );
|
||||
@@ -220,5 +220,5 @@ index 43c30ab369c..d8576949aea 100644
|
||||
|
||||
X11DRV_DisplayDevices_Init(FALSE);
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 07d4dc9e66dc130f0b43225959120a5cf3c73fcf Mon Sep 17 00:00:00 2001
|
||||
From 265a4a77fa8b971040526ddfbdb4cf85e81b4dbd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 26 Aug 2019 14:37:20 +0200
|
||||
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
|
||||
Subject: [PATCH 5/8] server: Add send_hardware_message flags for rawinput
|
||||
translation.
|
||||
|
||||
---
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
|
||||
3 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index f53d417c22a..d2f91b28ac0 100644
|
||||
index e5ea0735ed2..c14c726273f 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -3279,6 +3279,7 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -31,10 +31,10 @@ index f53d417c22a..d2f91b28ac0 100644
|
||||
case INPUT_HARDWARE:
|
||||
req->input.hw.msg = input->u.hi.uMsg;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index b5cc1dbae3a..3cff090335a 100644
|
||||
index 6a25db0326f..a61e4cca152 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -2040,6 +2040,7 @@ enum message_type
|
||||
@@ -2042,6 +2042,7 @@ enum message_type
|
||||
VARARG(keystate,bytes); /* global state array for all the keys */
|
||||
@END
|
||||
#define SEND_HWMSG_INJECTED 0x01
|
||||
@@ -43,10 +43,10 @@ index b5cc1dbae3a..3cff090335a 100644
|
||||
|
||||
/* Get a message from the current queue */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 71e3b69fe8c..d8428cdf13c 100644
|
||||
index fe5a3f2d5be..a4bea986b94 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -1817,7 +1817,7 @@ done:
|
||||
@@ -1736,7 +1736,7 @@ done:
|
||||
|
||||
/* 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,
|
||||
@@ -55,7 +55,7 @@ index 71e3b69fe8c..d8428cdf13c 100644
|
||||
{
|
||||
const struct rawinput_device *device;
|
||||
struct hardware_msg_data *msg_data;
|
||||
@@ -1872,7 +1872,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
@@ -1791,7 +1791,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
y = desktop->cursor.y;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 71e3b69fe8c..d8428cdf13c 100644
|
||||
{
|
||||
memset( &raw_msg, 0, sizeof(raw_msg) );
|
||||
raw_msg.foreground = foreground;
|
||||
@@ -1931,7 +1931,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
@@ -1850,7 +1850,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
|
||||
|
||||
/* queue a hardware message for a keyboard event */
|
||||
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
|
||||
@@ -73,7 +73,7 @@ index 71e3b69fe8c..d8428cdf13c 100644
|
||||
{
|
||||
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
|
||||
const struct rawinput_device *device;
|
||||
@@ -2009,7 +2009,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
|
||||
@@ -1928,7 +1928,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ index 71e3b69fe8c..d8428cdf13c 100644
|
||||
{
|
||||
memset( &raw_msg, 0, sizeof(raw_msg) );
|
||||
raw_msg.foreground = foreground;
|
||||
@@ -2632,10 +2632,10 @@ DECL_HANDLER(send_hardware_message)
|
||||
@@ -2546,10 +2546,10 @@ DECL_HANDLER(send_hardware_message)
|
||||
switch (req->input.type)
|
||||
{
|
||||
case INPUT_MOUSE:
|
||||
|
@@ -1,8 +1,8 @@
|
||||
From 783d9dddfdce0b272e98b0d9da20f39e0f02576c Mon Sep 17 00:00:00 2001
|
||||
From 1026871222aa0c54a9ebd747c1b4bd7220815a45 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 24 Mar 2021 23:29:28 +0100
|
||||
Subject: [PATCH] user32: Set SEND_HWMSG_RAWINPUT flags only when RAWINPUT is
|
||||
set.
|
||||
Subject: [PATCH 6/8] user32: Set SEND_HWMSG_RAWINPUT flags only when RAWINPUT
|
||||
is set.
|
||||
|
||||
So we can generate legacy messages only by calling __wine_send_input
|
||||
with NULL rawinput, and generate WM_INPUT messages only by calling
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From bb3a28f74aa0ff79539e0deb74a09275bbfc8c73 Mon Sep 17 00:00:00 2001
|
||||
From 73870c715c6f7f8249e021d0b2feb833cb0b2fe9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 25 Mar 2021 14:26:35 +0100
|
||||
Subject: [PATCH] user32: Support sending RIM_TYPEMOUSE through
|
||||
Subject: [PATCH 7/8] user32: Support sending RIM_TYPEMOUSE through
|
||||
__wine_send_input.
|
||||
|
||||
---
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] user32: Support sending RIM_TYPEMOUSE through
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
|
||||
index abf892d1474..839b6d6bc14 100644
|
||||
index 05f00704906..a81690bc0d3 100644
|
||||
--- a/dlls/user32/message.c
|
||||
+++ b/dlls/user32/message.c
|
||||
@@ -3299,6 +3299,12 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
|
||||
@@ -27,10 +27,10 @@ index abf892d1474..839b6d6bc14 100644
|
||||
req->input.hw.rawinput.hid.device = HandleToUlong( rawinput->header.hDevice );
|
||||
req->input.hw.rawinput.hid.param = rawinput->header.wParam;
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index d8428cdf13c..eef5bf56347 100644
|
||||
index a4bea986b94..6713b58c468 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -2103,6 +2103,9 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
|
||||
@@ -2022,6 +2022,9 @@ static void queue_custom_hardware_message( struct desktop *desktop, user_handle_
|
||||
msg_data->size = sizeof(*msg_data) + report_size;
|
||||
msg_data->rawinput = input->hw.rawinput;
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 53a1b02d4be9c6f30e1158ec987d5674d04dc158 Mon Sep 17 00:00:00 2001
|
||||
From b13e43a92335d20ff06dfbbeda37457b2c1edb3e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 25 Mar 2021 16:12:58 +0100
|
||||
Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the
|
||||
desktop thread.
|
||||
Date: Mon, 25 Oct 2021 11:45:47 +0200
|
||||
Subject: [PATCH 8/8] winex11.drv: Listen to RawMotion and RawButton* events in
|
||||
the desktop thread.
|
||||
|
||||
We still need to send "normal" input from the clipping window thread
|
||||
to trigger low-level hooks callbacks when clipping cursor. This is for
|
||||
instance used in our dinput implementation.
|
||||
---
|
||||
dlls/winex11.drv/event.c | 10 ++-
|
||||
dlls/winex11.drv/mouse.c | 110 ++++++++++++++++++++++++++++++---
|
||||
dlls/winex11.drv/event.c | 10 +++-
|
||||
dlls/winex11.drv/mouse.c | 106 ++++++++++++++++++++++++++++++---
|
||||
dlls/winex11.drv/x11drv.h | 1 +
|
||||
dlls/winex11.drv/x11drv_main.c | 4 ++
|
||||
4 files changed, 116 insertions(+), 9 deletions(-)
|
||||
4 files changed, 112 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index bc007bea1d6..bdfc133774a 100644
|
||||
@@ -54,7 +54,7 @@ index bc007bea1d6..bdfc133774a 100644
|
||||
#endif
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index c606f2755ae..01299392f7a 100644
|
||||
index c606f2755ae..0eaae753f87 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -415,7 +415,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask )
|
||||
@@ -128,20 +128,15 @@ index c606f2755ae..01299392f7a 100644
|
||||
XIRawEvent *event = xev->data;
|
||||
RAWINPUT rawinput;
|
||||
INPUT input;
|
||||
@@ -2002,7 +2012,89 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
@@ -2002,7 +2012,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
input.u.mi.dy = 0;
|
||||
if (!map_raw_event_coords( event, &input )) return FALSE;
|
||||
|
||||
- __wine_send_input( 0, &input, &rawinput );
|
||||
+ if (!thread_data->xi2_rawinput_only)
|
||||
+ {
|
||||
+ TRACE( "pos %d,%d\n", input.u.mi.dx, input.u.mi.dy );
|
||||
+ __wine_send_input( 0, &input, NULL );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ TRACE( "raw pos %d,%d\n", input.u.mi.dx, input.u.mi.dy );
|
||||
+
|
||||
+ rawinput.header.dwType = RIM_TYPEMOUSE;
|
||||
+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE);
|
||||
+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */
|
||||
@@ -161,6 +156,7 @@ index c606f2755ae..01299392f7a 100644
|
||||
+ if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY)
|
||||
+ __wine_send_input( 0, &input, &rawinput );
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
@@ -219,7 +215,7 @@ index c606f2755ae..01299392f7a 100644
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2078,6 +2170,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
@@ -2078,6 +2166,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
case XI_RawMotion:
|
||||
ret = X11DRV_RawMotion( event );
|
||||
break;
|
||||
|
Reference in New Issue
Block a user