diff --git a/patches/user32-rawinput-mouse/0005-winex11-Keep-track-of-mouse-device-and-pointer-butto.patch b/patches/user32-rawinput-mouse/0005-winex11-Keep-track-of-mouse-device-and-pointer-butto.patch index f47fc583..d2e0db6d 100644 --- a/patches/user32-rawinput-mouse/0005-winex11-Keep-track-of-mouse-device-and-pointer-butto.patch +++ b/patches/user32-rawinput-mouse/0005-winex11-Keep-track-of-mouse-device-and-pointer-butto.patch @@ -1,4 +1,4 @@ -From 03ca1a439ace6f14b8551a5e9a83dec83872577f Mon Sep 17 00:00:00 2001 +From 14dc22e926e64a1ab824278ba245caabe7e1449b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 19 Dec 2019 22:34:44 +0100 Subject: [PATCH] winex11: Keep track of mouse device and pointer button @@ -17,10 +17,10 @@ Original patch by Andrew Eikum . 5 files changed, 114 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac -index d7d8411c1a3..720e016d0af 100644 +index 51b453b9af4..7dcc220aecb 100644 --- a/configure.ac +++ b/configure.ac -@@ -1203,6 +1203,7 @@ then +@@ -1209,6 +1209,7 @@ then dnl *** All of the following tests require X11/Xlib.h AC_CHECK_HEADERS([X11/extensions/shape.h \ @@ -29,7 +29,7 @@ index d7d8411c1a3..720e016d0af 100644 X11/extensions/XShm.h \ X11/extensions/Xfixes.h \ diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index bb5bf6220e1..af0bdb54205 100644 +index 7b7371ed696..fdca9d67e0b 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1820,11 +1820,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags) @@ -71,7 +71,7 @@ index bb5bf6220e1..af0bdb54205 100644 /*********************************************************************** * VkKeyScanEx (X11DRV.@) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index e513e302351..23ceb5eb00a 100644 +index 501a8e5ebc2..ad8b86c1e61 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -31,6 +31,9 @@ @@ -175,7 +175,7 @@ index e513e302351..23ceb5eb00a 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H /*********************************************************************** * update_relative_valuators -@@ -1671,6 +1751,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) +@@ -1664,6 +1744,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) if (event->deviceid != data->xinput2_pointer) return FALSE; update_relative_valuators( event->classes, event->num_classes ); @@ -184,7 +184,7 @@ index e513e302351..23ceb5eb00a 100644 return TRUE; } -@@ -1819,7 +1901,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev ) +@@ -1812,7 +1894,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev ) */ void x11drv_xinput2_load(void) { @@ -193,7 +193,7 @@ index e513e302351..23ceb5eb00a 100644 int event, error; void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW ); -@@ -1835,11 +1917,20 @@ void x11drv_xinput2_load(void) +@@ -1828,11 +1910,20 @@ void x11drv_xinput2_load(void) return; \ } @@ -215,19 +215,19 @@ index e513e302351..23ceb5eb00a 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 1e669f9fe61..a6cfd5a483e 100644 +index 625e37eecc5..fbc7efc4ffa 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -687,6 +687,7 @@ extern void reapply_cursor_clipping(void); +@@ -701,6 +701,7 @@ extern void reapply_cursor_clipping(void); extern void ungrab_clipping_window(void); - extern void move_resize_window( HWND hwnd, int dir ); + extern void move_resize_window( HWND hwnd, int dir, POINT pos ); extern void X11DRV_InitKeyboard( Display *display ); +extern void X11DRV_InitMouse( Display *display ); extern BOOL X11DRV_ProcessEvents( DWORD mask ); extern HWND *build_hwnd_list(void); diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index abc14032c61..d95c4761529 100644 +index 7f05acccea6..40157645c53 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -672,6 +672,7 @@ static NTSTATUS x11drv_init( void *arg ) diff --git a/patches/winex11.drv-Query_server_position/0001-winex11.drv-window-Query-the-X-server-for-the-actual.patch b/patches/winex11.drv-Query_server_position/0001-winex11.drv-window-Query-the-X-server-for-the-actual.patch index e536d339..7f38239b 100644 --- a/patches/winex11.drv-Query_server_position/0001-winex11.drv-window-Query-the-X-server-for-the-actual.patch +++ b/patches/winex11.drv-Query_server_position/0001-winex11.drv-window-Query-the-X-server-for-the-actual.patch @@ -1,4 +1,4 @@ -From 35f112456d2095d17e59974ca7538c67bad110c2 Mon Sep 17 00:00:00 2001 +From f286821dd241e169a7a2146ac23b7200b66a645a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= Date: Mon, 24 Dec 2018 14:26:57 +0200 Subject: [PATCH] winex11.drv/window: Query the X server for the actual rect of @@ -22,10 +22,10 @@ Signed-off-by: Gabriel Ivăncescu 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index 0e06939f67d..cc5d0db870c 100644 +index 22c15c35468..b48bc13df7c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -222,6 +222,25 @@ static BOOL has_owned_popups( HWND hwnd ) +@@ -345,6 +345,25 @@ static BOOL has_owned_popups( HWND hwnd ) return ret; } @@ -51,13 +51,13 @@ index 0e06939f67d..cc5d0db870c 100644 /*********************************************************************** * alloc_win_data -@@ -2629,7 +2648,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, cons +@@ -2995,7 +3014,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN + if (old_style & WS_VISIBLE) { if (((swp_flags & SWP_HIDEWINDOW) && !(new_style & WS_VISIBLE)) || - (!event_type && !(new_style & WS_MINIMIZE) && -- !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ))) -+ !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ) && -+ !is_actual_window_rect_mapped( data ))) +- (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ))) ++ (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ) & ++ !is_actual_window_rect_mapped( data ))) { release_win_data( data ); unmap_window( hwnd ); diff --git a/staging/upstream-commit b/staging/upstream-commit index facf5c56..565fc3e0 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -157105cb6d306f9794f0f3ebaa55d9c891e3be8f +51ccd95c49c2c61ad41960b25a01f834601d70c0