mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
user32-rawinput-mouse: Directly use win32u for user functions.
This commit is contained in:
parent
fff59d624e
commit
5147239513
@ -1,4 +1,4 @@
|
||||
From d600e283addb830dace3df98f7eb9aaf9fd040ab Mon Sep 17 00:00:00 2001
|
||||
From f1a36450c2cbb7975e310a1301d0ed4e1d2670a2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Mon, 25 Oct 2021 11:45:47 +0200
|
||||
Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the
|
||||
@ -15,7 +15,7 @@ instance used in our dinput implementation.
|
||||
4 files changed, 112 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index e75ae679106..ffad1ffa9eb 100644
|
||||
index e386a039e26..0b5d43e6fbd 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -321,6 +321,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE
|
||||
@ -54,7 +54,7 @@ index e75ae679106..ffad1ffa9eb 100644
|
||||
#endif
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index a02d8c552c2..0069acde17e 100644
|
||||
index a02d8c552c2..b6b84174e0d 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -412,7 +412,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask )
|
||||
@ -63,7 +63,7 @@ index a02d8c552c2..0069acde17e 100644
|
||||
XISetMask( mask_bits, XI_RawMotion );
|
||||
- XISetMask( mask_bits, XI_ButtonPress );
|
||||
+
|
||||
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
+ if (NtUserGetWindowThread( NtUserGetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
+ {
|
||||
+ XISetMask( mask_bits, XI_RawButtonPress );
|
||||
+ XISetMask( mask_bits, XI_RawButtonRelease );
|
||||
@ -227,7 +227,7 @@ index a02d8c552c2..0069acde17e 100644
|
||||
default:
|
||||
TRACE( "Unhandled event %#x\n", event->evtype );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index b2e5cb41b73..186e3ff5404 100644
|
||||
index b78eab78dd1..5f0e00b2fb2 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -397,6 +397,7 @@ struct x11drv_thread_data
|
||||
@ -239,14 +239,14 @@ index b2e5cb41b73..186e3ff5404 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index fecd98daf8e..fd5c978e03f 100644
|
||||
index fecd98daf8e..476743ba934 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -725,6 +725,8 @@ void X11DRV_ThreadDetach(void)
|
||||
if (data)
|
||||
{
|
||||
vulkan_thread_detach();
|
||||
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
+ if (NtUserGetWindowThread( NtUserGetDesktopWindow(), 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 );
|
||||
@ -255,11 +255,11 @@ index fecd98daf8e..fd5c978e03f 100644
|
||||
if (use_xim) X11DRV_SetupXIM();
|
||||
|
||||
x11drv_xinput_init();
|
||||
+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
+ if (NtUserGetWindowThread( NtUserGetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
+ x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask );
|
||||
|
||||
return data;
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
2.34.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user