You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 64cca153292833151d1adeb185252ca57e2d1625.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 5cd6a66d34a8844d757413804a6b4b358075993d Mon Sep 17 00:00:00 2001
|
||||
From a96d0f2e49227bab4a3181ce083afabb65adb950 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.
|
||||
@@ -93,7 +93,7 @@ index c34f5fde77e..f9cf4a33255 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 10a68779003..a8bbc207007 100644
|
||||
index 9ceec5ee6d8..dbdb9c530bb 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -258,7 +258,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
|
||||
@@ -107,7 +107,7 @@ index 10a68779003..a8bbc207007 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 03a09a32d8a..657d8f52db0 100644
|
||||
index 3a1e1973b24..6457c0a0b93 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -704,7 +704,7 @@ static NTSTATUS x11drv_init( void *arg )
|
||||
@@ -121,7 +121,7 @@ index 03a09a32d8a..657d8f52db0 100644
|
||||
X11DRV_InitKeyboard( gdi_display );
|
||||
@@ -794,6 +794,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
|
||||
|
||||
if (use_xim) X11DRV_SetupXIM();
|
||||
if (use_xim) xim_thread_attach( data );
|
||||
|
||||
+ x11drv_xinput_init();
|
||||
+
|
||||
@@ -129,5 +129,5 @@ index 03a09a32d8a..657d8f52db0 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.2
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9f8722c6be41731d7913f804591a0c28999340cf Mon Sep 17 00:00:00 2001
|
||||
From a09b36f783354e7cdd1e44fc57195b0136c8b2fd 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
|
||||
@@ -16,10 +16,10 @@ 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 616728be621..5d02da68313 100644
|
||||
index b1c47d5258e..c6a167dc4c6 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1863,13 +1863,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
@@ -1811,13 +1811,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
|
||||
{
|
||||
HWND hwnd;
|
||||
|
||||
@@ -196,7 +196,7 @@ index 00c55802245..e25b3e7728a 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 20172a99853..4394ea6d001 100644
|
||||
index 7fcb9300ba0..38cacb4d3d4 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -702,6 +702,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
|
||||
@@ -208,7 +208,7 @@ index 20172a99853..4394ea6d001 100644
|
||||
extern HWND *build_hwnd_list(void) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index 657d8f52db0..142bd596dd3 100644
|
||||
index 6457c0a0b93..e449530749e 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -708,6 +708,7 @@ static NTSTATUS x11drv_init( void *arg )
|
||||
@@ -216,9 +216,9 @@ index 657d8f52db0..142bd596dd3 100644
|
||||
XkbUseExtension( gdi_display, NULL, NULL );
|
||||
X11DRV_InitKeyboard( gdi_display );
|
||||
+ X11DRV_InitMouse( gdi_display );
|
||||
if (use_xim) use_xim = X11DRV_InitXIM( input_style );
|
||||
if (use_xim) use_xim = xim_init( input_style );
|
||||
|
||||
init_user_driver();
|
||||
--
|
||||
2.39.2
|
||||
2.40.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 43a54849310a49babfee6c7ea08d92c4535514c3 Mon Sep 17 00:00:00 2001
|
||||
From 5cf6861a6cff5f3f3bee4694f07ba8679cba607d 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(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index c8833671f12..a7bd4312737 100644
|
||||
index ff654ae6647..33a3aca953d 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -320,6 +320,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE
|
||||
@@ -54,7 +54,7 @@ index c8833671f12..a7bd4312737 100644
|
||||
#endif
|
||||
}
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 17e88f87982..8547553215c 100644
|
||||
index bb9807bf850..919cc8c7fb8 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -413,7 +413,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask )
|
||||
@@ -77,7 +77,7 @@ index 17e88f87982..8547553215c 100644
|
||||
|
||||
pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 );
|
||||
|
||||
@@ -767,7 +778,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
|
||||
@@ -766,7 +777,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
|
||||
sync_window_cursor( window );
|
||||
last_cursor_change = input->u.mi.time;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ index 17e88f87982..8547553215c 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -808,7 +819,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
|
||||
@@ -807,7 +818,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU
|
||||
SERVER_END_REQ;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ index 17e88f87982..8547553215c 100644
|
||||
}
|
||||
|
||||
#ifdef SONAME_LIBXCURSOR
|
||||
@@ -1791,7 +1802,6 @@ void move_resize_window( HWND hwnd, int dir )
|
||||
@@ -1790,7 +1801,6 @@ void move_resize_window( HWND hwnd, int dir )
|
||||
{
|
||||
MSG msg;
|
||||
INPUT input;
|
||||
@@ -103,7 +103,7 @@ index 17e88f87982..8547553215c 100644
|
||||
int x, y, rootX, rootY;
|
||||
|
||||
if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break;
|
||||
@@ -1807,7 +1817,7 @@ void move_resize_window( HWND hwnd, int dir )
|
||||
@@ -1806,7 +1816,7 @@ void move_resize_window( HWND hwnd, int dir )
|
||||
input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
|
||||
input.u.mi.time = NtGetTickCount();
|
||||
input.u.mi.dwExtraInfo = 0;
|
||||
@@ -112,7 +112,7 @@ index 17e88f87982..8547553215c 100644
|
||||
}
|
||||
|
||||
while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE ))
|
||||
@@ -2019,6 +2029,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -2018,6 +2028,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
*/
|
||||
static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
{
|
||||
@@ -120,7 +120,7 @@ index 17e88f87982..8547553215c 100644
|
||||
XIRawEvent *event = xev->data;
|
||||
RAWINPUT rawinput;
|
||||
INPUT input;
|
||||
@@ -2038,7 +2049,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
@@ -2037,7 +2048,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
|
||||
input.u.mi.dy = 0;
|
||||
if (!map_raw_event_coords( event, &input )) return FALSE;
|
||||
|
||||
@@ -207,7 +207,7 @@ index 17e88f87982..8547553215c 100644
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2114,6 +2203,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
@@ -2113,6 +2202,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev )
|
||||
case XI_RawMotion:
|
||||
ret = X11DRV_RawMotion( event );
|
||||
break;
|
||||
@@ -219,10 +219,10 @@ index 17e88f87982..8547553215c 100644
|
||||
default:
|
||||
TRACE( "Unhandled event %#x\n", event->evtype );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 5f1a5ecaecd..7325d3ff9aa 100644
|
||||
index 38cacb4d3d4..fcae7bbc9df 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -404,6 +404,7 @@ struct x11drv_thread_data
|
||||
@@ -405,6 +405,7 @@ struct x11drv_thread_data
|
||||
XIValuatorClassInfo x_valuator;
|
||||
XIValuatorClassInfo y_valuator;
|
||||
int xi2_core_pointer; /* XInput2 core pointer id */
|
||||
@@ -231,10 +231,10 @@ index 5f1a5ecaecd..7325d3ff9aa 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index 6707a64bcf6..c984639dbf9 100644
|
||||
index e449530749e..42de6c0e7a7 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -733,6 +733,8 @@ void X11DRV_ThreadDetach(void)
|
||||
@@ -728,6 +728,8 @@ void X11DRV_ThreadDetach(void)
|
||||
if (data)
|
||||
{
|
||||
vulkan_thread_detach();
|
||||
@@ -243,8 +243,8 @@ index 6707a64bcf6..c984639dbf9 100644
|
||||
if (data->xim) XCloseIM( data->xim );
|
||||
if (data->font_set) XFreeFontSet( data->display, data->font_set );
|
||||
XCloseDisplay( data->display );
|
||||
@@ -804,6 +806,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
|
||||
if (use_xim) X11DRV_SetupXIM();
|
||||
@@ -796,6 +798,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
|
||||
if (use_xim) xim_thread_attach( data );
|
||||
|
||||
x11drv_xinput_init();
|
||||
+ if (NtUserGetWindowThread( NtUserGetDesktopWindow(), NULL ) == GetCurrentThreadId())
|
||||
@@ -253,5 +253,5 @@ index 6707a64bcf6..c984639dbf9 100644
|
||||
return data;
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
2.40.0
|
||||
|
||||
|
Reference in New Issue
Block a user