Rebase against 56db5b0bf1aa6df5edbedbec03e0a1db39d6639b.

This commit is contained in:
Alistair Leslie-Hughes
2023-03-01 10:05:20 +11:00
parent 7b0d44f887
commit dc43a031be
8 changed files with 106 additions and 119 deletions

View File

@@ -1,4 +1,4 @@
From 05d2f03034c4bd2cc97f22c67e7bd9de3c3f710b Mon Sep 17 00:00:00 2001
From 5cd6a66d34a8844d757413804a6b4b358075993d 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.
@@ -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 51a6828f10c..121f42eb541 100644
index c34f5fde77e..f9cf4a33255 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -277,6 +277,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
@@ -278,6 +278,32 @@ static void update_relative_valuators(XIAnyClassInfo **valuators, int n_valuator
}
@@ -47,7 +47,7 @@ index 51a6828f10c..121f42eb541 100644
/***********************************************************************
* enable_xinput2
*/
@@ -288,19 +314,9 @@ static void enable_xinput2(void)
@@ -289,19 +315,9 @@ static void enable_xinput2(void)
unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)];
int count;
@@ -69,7 +69,7 @@ index 51a6828f10c..121f42eb541 100644
if (!pXIGetClientPointer( data->display, None, &data->xi2_core_pointer )) return;
mask.mask = mask_bits;
@@ -341,9 +357,9 @@ static void disable_xinput2(void)
@@ -342,9 +358,9 @@ static void disable_xinput2(void)
struct x11drv_thread_data *data = x11drv_thread_data();
XIEventMask mask;
@@ -80,7 +80,7 @@ index 51a6828f10c..121f42eb541 100644
data->xi2_state = xi_disabled;
mask.mask = NULL;
@@ -1921,9 +1937,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -1954,9 +1970,9 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
/***********************************************************************
@@ -93,10 +93,10 @@ index 51a6828f10c..121f42eb541 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 8bcc204db9b..3f3e386ea4a 100644
index 10a68779003..a8bbc207007 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -247,7 +247,8 @@ extern void CDECL X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
@@ -258,7 +258,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
/* X11 driver internal functions */
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
@@ -107,19 +107,19 @@ index 8bcc204db9b..3f3e386ea4a 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 32beb84a009..2e083e322ec 100644
index 03a09a32d8a..657d8f52db0 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -619,7 +619,7 @@ static BOOL process_attach(void)
@@ -704,7 +704,7 @@ static NTSTATUS x11drv_init( void *arg )
#ifdef SONAME_LIBXCOMPOSITE
X11DRV_XComposite_Init();
#endif
- X11DRV_XInput2_Init();
+ x11drv_xinput_load();
#ifdef HAVE_XKB
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
@@ -713,6 +713,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
XkbUseExtension( gdi_display, NULL, NULL );
X11DRV_InitKeyboard( gdi_display );
@@ -794,6 +794,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if (use_xim) X11DRV_SetupXIM();
@@ -129,5 +129,5 @@ index 32beb84a009..2e083e322ec 100644
}
--
2.34.1
2.39.2

View File

@@ -1,4 +1,4 @@
From 96b8ddff387307f13d34bd36a3e6363e6b50627f Mon Sep 17 00:00:00 2001
From 9f8722c6be41731d7913f804591a0c28999340cf 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 f1ad4b01669..5b1b892de32 100644
index 616728be621..5d02da68313 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1880,13 +1880,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
@@ -1863,13 +1863,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event )
{
HWND hwnd;
@@ -51,7 +51,7 @@ index f1ad4b01669..5b1b892de32 100644
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 2b0aece8700..82a82032957 100644
index 00c55802245..e25b3e7728a 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -30,6 +30,9 @@
@@ -150,7 +150,7 @@ index 2b0aece8700..82a82032957 100644
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
/***********************************************************************
* update_relative_valuators
@@ -1877,6 +1952,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
@@ -1876,6 +1951,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 2b0aece8700..82a82032957 100644
return TRUE;
}
@@ -1964,13 +2041,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
@@ -1963,13 +2040,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev )
#endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */
@@ -174,7 +174,7 @@ index 2b0aece8700..82a82032957 100644
int event, error;
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
@@ -1986,11 +2062,20 @@ void x11drv_xinput_load(void)
@@ -1985,11 +2061,20 @@ void x11drv_xinput_load(void)
return; \
}
@@ -196,10 +196,10 @@ index 2b0aece8700..82a82032957 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 e342fc01cdf..16308dfab4e 100644
index 20172a99853..4394ea6d001 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -699,6 +699,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN;
@@ -702,6 +702,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,17 +208,17 @@ index e342fc01cdf..16308dfab4e 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 891a514bbcc..0197ae93978 100644
index 657d8f52db0..142bd596dd3 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -712,6 +712,7 @@ static NTSTATUS x11drv_init( void *arg )
if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL );
#endif
@@ -708,6 +708,7 @@ static NTSTATUS x11drv_init( void *arg )
XkbUseExtension( gdi_display, NULL, NULL );
X11DRV_InitKeyboard( gdi_display );
+ X11DRV_InitMouse( gdi_display );
if (use_xim) use_xim = X11DRV_InitXIM( input_style );
init_user_driver();
--
2.39.0
2.39.2