You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Rebase against 07f22e20d73ce0a3c758d331400e765795d675a0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From e880574bf3be3467af6238cdb020e593878e2dca Mon Sep 17 00:00:00 2001
|
||||
From 9c9c16e92e50527474f567372b90c5dfa178c797 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Thu, 23 Jan 2020 11:00:19 +0100
|
||||
Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows.
|
||||
@@ -14,7 +14,7 @@ which can bring additional information.
|
||||
5 files changed, 65 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
|
||||
index 0ac538d06ed..482b9c2c94d 100644
|
||||
index a89824772d0..6b19f8274a8 100644
|
||||
--- a/dlls/winex11.drv/desktop.c
|
||||
+++ b/dlls/winex11.drv/desktop.c
|
||||
@@ -358,6 +358,7 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height )
|
||||
@@ -26,7 +26,7 @@ index 0ac538d06ed..482b9c2c94d 100644
|
||||
|
||||
X11DRV_init_desktop( win, width, height );
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index 170111e9c28..bbb39135d88 100644
|
||||
index eb2f0c6626c..e75ae679106 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -238,6 +238,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
|
||||
@@ -44,7 +44,7 @@ index 170111e9c28..bbb39135d88 100644
|
||||
case MotionNotify:
|
||||
case EnterNotify:
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 121f42eb541..27a1e326cc2 100644
|
||||
index dbf438a8b22..ea5e34059ec 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -304,20 +304,32 @@ void x11drv_xinput_init(void)
|
||||
@@ -185,10 +185,10 @@ index 121f42eb541..27a1e326cc2 100644
|
||||
}
|
||||
else if (prev_clip_hwnd)
|
||||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
|
||||
index 29473ceba06..460e1a7983a 100644
|
||||
index 8b191ca23ed..ca6cbc8129c 100644
|
||||
--- a/dlls/winex11.drv/window.c
|
||||
+++ b/dlls/winex11.drv/window.c
|
||||
@@ -375,6 +375,7 @@ static void sync_window_style( struct x11drv_win_data *data )
|
||||
@@ -378,6 +378,7 @@ static void sync_window_style( struct x11drv_win_data *data )
|
||||
int mask = get_window_attributes( data, &attr );
|
||||
|
||||
XChangeWindowAttributes( data->display, data->whole_window, mask, &attr );
|
||||
@@ -196,7 +196,7 @@ index 29473ceba06..460e1a7983a 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1594,6 +1595,7 @@ static void create_whole_window( struct x11drv_win_data *data )
|
||||
@@ -1605,6 +1606,7 @@ static void create_whole_window( struct x11drv_win_data *data )
|
||||
data->vis.visual, mask, &attr );
|
||||
if (!data->whole_window) goto done;
|
||||
|
||||
@@ -204,19 +204,19 @@ index 29473ceba06..460e1a7983a 100644
|
||||
set_initial_wm_hints( data->display, data->whole_window );
|
||||
set_wm_hints( data );
|
||||
|
||||
@@ -1908,6 +1910,7 @@ BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
|
||||
@@ -1919,6 +1921,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd )
|
||||
data->clip_window = XCreateWindow( data->display, root_window, 0, 0, 1, 1, 0, 0,
|
||||
InputOnly, default_visual.visual,
|
||||
CWOverrideRedirect | CWEventMask, &attr );
|
||||
+ x11drv_xinput_enable( data->display, data->clip_window, attr.event_mask );
|
||||
XFlush( data->display );
|
||||
SetPropA( hwnd, clip_window_prop, (HANDLE)data->clip_window );
|
||||
NtUserSetProp( hwnd, clip_window_prop, (HANDLE)data->clip_window );
|
||||
X11DRV_InitClipboard();
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 3f3e386ea4a..3eff6f23e22 100644
|
||||
index 2130a35336d..344625aff71 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -249,6 +249,8 @@ extern void CDECL X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
|
||||
@@ -248,6 +248,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
|
||||
extern void x11drv_xinput_load(void) DECLSPEC_HIDDEN;
|
||||
extern void x11drv_xinput_init(void) DECLSPEC_HIDDEN;
|
||||
@@ -225,7 +225,7 @@ index 3f3e386ea4a..3eff6f23e22 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,
|
||||
@@ -370,6 +372,14 @@ struct x11drv_escape_flush_gl_drawable
|
||||
@@ -368,6 +370,14 @@ struct x11drv_escape_flush_gl_drawable
|
||||
* X11 USER driver
|
||||
*/
|
||||
|
||||
@@ -240,7 +240,7 @@ index 3f3e386ea4a..3eff6f23e22 100644
|
||||
struct x11drv_thread_data
|
||||
{
|
||||
Display *display;
|
||||
@@ -385,7 +395,7 @@ struct x11drv_thread_data
|
||||
@@ -383,7 +393,7 @@ struct x11drv_thread_data
|
||||
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
|
||||
DWORD clip_reset; /* time when clipping was last reset */
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
@@ -250,5 +250,5 @@ index 3f3e386ea4a..3eff6f23e22 100644
|
||||
int xi2_device_count;
|
||||
XIValuatorClassInfo x_valuator;
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From fe6fb7ca2e0dce4a023c13480293dd4860027eac Mon Sep 17 00:00:00 2001
|
||||
From c49e3afea43630cefb5c8ee9012b2ffd48a819e5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Sun, 24 Oct 2021 22:30:56 +0200
|
||||
Subject: [PATCH] winex11.drv: Advertise XInput2 version 2.1 support.
|
||||
@@ -22,7 +22,7 @@ device events only and get rid of slave device id tracking.
|
||||
2 files changed, 5 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index 27a1e326cc2..1e3b9ad2be0 100644
|
||||
index ea5e34059ec..b9ff9f38014 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -284,7 +284,7 @@ void x11drv_xinput_init(void)
|
||||
@@ -90,7 +90,7 @@ index 27a1e326cc2..1e3b9ad2be0 100644
|
||||
data->xi2_state = xi_disabled;
|
||||
#endif
|
||||
}
|
||||
@@ -1857,7 +1844,6 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
@@ -1860,7 +1847,6 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
|
||||
if (event->reason != XISlaveSwitch) return FALSE;
|
||||
|
||||
update_relative_valuators( event->classes, event->num_classes );
|
||||
@@ -98,7 +98,7 @@ index 27a1e326cc2..1e3b9ad2be0 100644
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1873,25 +1859,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
@@ -1876,25 +1862,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
|
||||
if (x->number < 0 || y->number < 0) return FALSE;
|
||||
if (!event->valuators.mask_len) return FALSE;
|
||||
if (thread_data->xi2_state != xi_enabled) return FALSE;
|
||||
@@ -123,13 +123,13 @@ index 27a1e326cc2..1e3b9ad2be0 100644
|
||||
- if (event->deviceid != thread_data->xi2_current_slave) return FALSE;
|
||||
+ if (event->deviceid != thread_data->xi2_core_pointer) return FALSE;
|
||||
|
||||
virtual_rect = get_virtual_screen_rect();
|
||||
virtual_rect = NtUserGetVirtualScreenRect();
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 3eff6f23e22..8cddfa05904 100644
|
||||
index 344625aff71..3e4d49d3dcf 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -396,12 +396,9 @@ struct x11drv_thread_data
|
||||
@@ -394,12 +394,9 @@ struct x11drv_thread_data
|
||||
DWORD clip_reset; /* time when clipping was last reset */
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
|
||||
enum xi2_state xi2_state; /* XInput2 state */
|
||||
@@ -143,5 +143,5 @@ index 3eff6f23e22..8cddfa05904 100644
|
||||
};
|
||||
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user