Rebase against 530c1839603bd3caa1b9d17fe458b5bd341ccfc9.

This commit is contained in:
Alistair Leslie-Hughes
2021-10-19 10:34:24 +11:00
parent 6bc16f96f7
commit 164b361be6
5 changed files with 30 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
From a5f930d50c026021b7d7ccac2cb2a58d43abff12 Mon Sep 17 00:00:00 2001
From 39ec871a215f656ba792b846d0f1bb8cf055b735 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
@@ -141,9 +141,7 @@ index 6b6512521f4..7ff360d5127 100644
+ else
+ {
+ TRACE( "raw pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy );
- input.type = INPUT_MOUSE;
- __wine_send_input( 0, &input, &rawinput );
+
+ rawinput.header.dwType = RIM_TYPEMOUSE;
+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE);
+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */
@@ -165,7 +163,9 @@ index 6b6512521f4..7ff360d5127 100644
+ }
+ return TRUE;
+}
+
- input.type = INPUT_MOUSE;
- __wine_send_input( 0, &input, &rawinput );
+/***********************************************************************
+ * X11DRV_RawButtonEvent
+ */
@@ -233,10 +233,10 @@ index 6b6512521f4..7ff360d5127 100644
default:
TRACE( "Unhandled event %#x\n", event->evtype );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 7a89a010395..2fd8519971d 100644
index d8758e8a412..ef1765d42c7 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -352,6 +352,7 @@ struct x11drv_thread_data
@@ -351,6 +351,7 @@ struct x11drv_thread_data
struct x11drv_valuator_data x_rel_valuator;
struct x11drv_valuator_data y_rel_valuator;
int xi2_core_pointer; /* XInput2 core pointer id */
@@ -245,19 +245,19 @@ index 7a89a010395..2fd8519971d 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
index 2a35a6a8548..0efe62a6c21 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -633,6 +633,8 @@ void CDECL X11DRV_ThreadDetach(void)
@@ -647,6 +647,8 @@ void CDECL X11DRV_ThreadDetach(void)
if (data)
{
vulkan_thread_detach();
+ 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)
@@ -718,6 +720,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if (use_xim) X11DRV_SetupXIM();
x11drv_xinput_init();
@@ -267,5 +267,5 @@ index d8576949aea..c16825751c8 100644
return data;
}
--
2.30.2
2.33.0