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 7ed63c30e8dee3509c52e11230470be2dcfe6cf5.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 3c53044557316db957a20471118c1481bb712a6c Mon Sep 17 00:00:00 2001
|
||||
From 76aacbedda940eb85cbb98ea7207adcedcd039d8 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.
|
||||
@@ -6,30 +6,31 @@ Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows.
|
||||
This will allow us to listen to the XInput version of several events,
|
||||
which can bring additional information.
|
||||
---
|
||||
dlls/winex11.drv/desktop.c | 1 +
|
||||
dlls/winex11.drv/desktop.c | 2 ++
|
||||
dlls/winex11.drv/event.c | 7 +++++
|
||||
dlls/winex11.drv/mouse.c | 59 +++++++++++++++++++++++++++-----------
|
||||
dlls/winex11.drv/window.c | 3 ++
|
||||
dlls/winex11.drv/x11drv.h | 12 +++++++-
|
||||
5 files changed, 65 insertions(+), 17 deletions(-)
|
||||
5 files changed, 66 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
|
||||
index bc2ba60397b..96f74478600 100644
|
||||
index 168029367d3..7a8fb70059e 100644
|
||||
--- a/dlls/winex11.drv/desktop.c
|
||||
+++ b/dlls/winex11.drv/desktop.c
|
||||
@@ -363,6 +363,7 @@ NTSTATUS x11drv_create_desktop( void *arg )
|
||||
0, 0, params->width, params->height, 0, default_visual.depth, InputOutput,
|
||||
@@ -379,6 +379,8 @@ BOOL X11DRV_CreateDesktop( const WCHAR *name, UINT width, UINT height )
|
||||
0, 0, width, height, 0, default_visual.depth, InputOutput,
|
||||
default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr );
|
||||
if (!win) return FALSE;
|
||||
+
|
||||
+ x11drv_xinput_enable( display, win, win_attr.event_mask );
|
||||
if (!create_desktop_win_data( win )) return FALSE;
|
||||
XFlush( display );
|
||||
|
||||
X11DRV_init_desktop( win, params->width, params->height );
|
||||
X11DRV_init_desktop( win, width, height );
|
||||
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
||||
index f81d2338faf..93032cedf70 100644
|
||||
index b33fd6e0390..af96c10bbab 100644
|
||||
--- a/dlls/winex11.drv/event.c
|
||||
+++ b/dlls/winex11.drv/event.c
|
||||
@@ -237,6 +237,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
|
||||
@@ -235,6 +235,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg )
|
||||
return (mask & QS_MOUSEBUTTON) != 0;
|
||||
#ifdef GenericEvent
|
||||
case GenericEvent:
|
||||
@@ -44,7 +45,7 @@ index f81d2338faf..93032cedf70 100644
|
||||
case MotionNotify:
|
||||
case EnterNotify:
|
||||
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
|
||||
index b0dce3b245f..0725da89f67 100644
|
||||
index f9cf4a33255..edde25b7b43 100644
|
||||
--- a/dlls/winex11.drv/mouse.c
|
||||
+++ b/dlls/winex11.drv/mouse.c
|
||||
@@ -305,20 +305,32 @@ void x11drv_xinput_init(void)
|
||||
@@ -157,7 +158,7 @@ index b0dce3b245f..0725da89f67 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -421,7 +448,7 @@ static BOOL grab_clipping_window( const RECT *clip )
|
||||
@@ -420,7 +447,7 @@ static BOOL grab_clipping_window( const RECT *clip )
|
||||
}
|
||||
|
||||
/* enable XInput2 unless we are already clipping */
|
||||
@@ -166,7 +167,7 @@ index b0dce3b245f..0725da89f67 100644
|
||||
|
||||
if (data->xi2_state != xi_enabled)
|
||||
{
|
||||
@@ -451,7 +478,7 @@ static BOOL grab_clipping_window( const RECT *clip )
|
||||
@@ -450,7 +477,7 @@ static BOOL grab_clipping_window( const RECT *clip )
|
||||
|
||||
if (!clipping_cursor)
|
||||
{
|
||||
@@ -175,7 +176,7 @@ index b0dce3b245f..0725da89f67 100644
|
||||
NtUserDestroyWindow( msg_hwnd );
|
||||
return FALSE;
|
||||
}
|
||||
@@ -534,7 +561,7 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND prev_clip_hwnd, HWND new_clip_hwnd )
|
||||
@@ -533,7 +560,7 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND prev_clip_hwnd, HWND new_clip_hwnd )
|
||||
TRACE( "clip hwnd reset from %p\n", hwnd );
|
||||
data->clip_hwnd = 0;
|
||||
data->clip_reset = NtGetTickCount();
|
||||
@@ -185,10 +186,10 @@ index b0dce3b245f..0725da89f67 100644
|
||||
}
|
||||
else if (prev_clip_hwnd)
|
||||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
|
||||
index 5d9a93688c3..bfad72482e6 100644
|
||||
index 63827aa1aa6..39aff46c864 100644
|
||||
--- a/dlls/winex11.drv/window.c
|
||||
+++ b/dlls/winex11.drv/window.c
|
||||
@@ -361,6 +361,7 @@ static void sync_window_style( struct x11drv_win_data *data )
|
||||
@@ -362,6 +362,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 +197,7 @@ index 5d9a93688c3..bfad72482e6 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1599,6 +1600,7 @@ static void create_whole_window( struct x11drv_win_data *data )
|
||||
@@ -1647,6 +1648,7 @@ static void create_whole_window( struct x11drv_win_data *data )
|
||||
data->vis.visual, mask, &attr );
|
||||
if (!data->whole_window) goto done;
|
||||
|
||||
@@ -204,7 +205,7 @@ index 5d9a93688c3..bfad72482e6 100644
|
||||
set_initial_wm_hints( data->display, data->whole_window );
|
||||
set_wm_hints( data );
|
||||
|
||||
@@ -1911,6 +1913,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd )
|
||||
@@ -1982,6 +1984,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 );
|
||||
@@ -213,10 +214,10 @@ index 5d9a93688c3..bfad72482e6 100644
|
||||
NtUserSetProp( hwnd, clip_window_prop, (HANDLE)data->clip_window );
|
||||
X11DRV_DisplayDevices_RegisterEventHandlers();
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 9fd5fb481a7..c1c5f1ac34d 100644
|
||||
index 5d176a9ef14..5666cd26434 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -259,6 +259,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
|
||||
@@ -264,6 +264,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 +226,7 @@ index 9fd5fb481a7..c1c5f1ac34d 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,
|
||||
@@ -364,6 +366,14 @@ struct x11drv_escape_flush_gl_drawable
|
||||
@@ -379,6 +381,14 @@ struct x11drv_escape_flush_gl_drawable
|
||||
* X11 USER driver
|
||||
*/
|
||||
|
||||
@@ -240,7 +241,7 @@ index 9fd5fb481a7..c1c5f1ac34d 100644
|
||||
struct x11drv_thread_data
|
||||
{
|
||||
Display *display;
|
||||
@@ -379,7 +389,7 @@ struct x11drv_thread_data
|
||||
@@ -395,7 +405,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 +251,5 @@ index 9fd5fb481a7..c1c5f1ac34d 100644
|
||||
int xi2_device_count;
|
||||
XIValuatorClassInfo x_valuator;
|
||||
--
|
||||
2.36.1
|
||||
2.40.1
|
||||
|
||||
|
Reference in New Issue
Block a user