user32-rawinput-mouse: Update from Rémi Bernon.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50969
This commit is contained in:
Zebediah Figura 2021-04-12 17:00:07 -05:00
parent e353590528
commit a886228fbc

View File

@ -1,4 +1,4 @@
From a385e325b7fda81327d4e4d41363d20e98b3171f Mon Sep 17 00:00:00 2001
From 22846605056d89063ec4c78b353f48d76b39b41f 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
@ -8,10 +8,11 @@ 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 | 107 ++++++++++++++++++++++++++++++++++----
dlls/winex11.drv/x11drv.h | 1 +
3 files changed, 107 insertions(+), 11 deletions(-)
dlls/winex11.drv/event.c | 10 ++-
dlls/winex11.drv/mouse.c | 107 ++++++++++++++++++++++++++++++---
dlls/winex11.drv/x11drv.h | 1 +
dlls/winex11.drv/x11drv_main.c | 4 ++
4 files changed, 111 insertions(+), 11 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 217c1eca857..8685ce9536b 100644
@ -239,6 +240,28 @@ index afa990b7e68..910a6c6cc18 100644
};
extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index d8576949aea..c16825751c8 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -633,6 +633,8 @@ void CDECL X11DRV_ThreadDetach(void)
if (data)
{
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
+ x11drv_xinput_disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
if (data->xim) XCloseIM( data->xim );
if (data->font_set) XFreeFontSet( data->display, data->font_set );
XCloseDisplay( data->display );
@@ -704,6 +706,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if (use_xim) X11DRV_SetupXIM();
x11drv_xinput_init();
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
+ x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
return data;
}
--
2.30.2