From a11194038c3534924ff75652f84c793cead4fdbb Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 22 Feb 2023 15:34:37 -0600 Subject: [PATCH] Rebase against 15b176b4f4945d7abfb4adbddc7f140ba1765855. --- ...-track-of-pointer-and-device-button-.patch | 36 +++++++------- ...v-Add-support-for-_NET_ACTIVE_WINDOW.patch | 48 +++++++++---------- staging/upstream-commit | 2 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/patches/user32-rawinput-mouse/0004-winex11.drv-Keep-track-of-pointer-and-device-button-.patch b/patches/user32-rawinput-mouse/0004-winex11.drv-Keep-track-of-pointer-and-device-button-.patch index 065dd1fe..d16cec82 100644 --- a/patches/user32-rawinput-mouse/0004-winex11.drv-Keep-track-of-pointer-and-device-button-.patch +++ b/patches/user32-rawinput-mouse/0004-winex11.drv-Keep-track-of-pointer-and-device-button-.patch @@ -1,4 +1,4 @@ -From fc733a73005bccb09df5572755595e427f667d56 Mon Sep 17 00:00:00 2001 +From 96b8ddff387307f13d34bd36a3e6363e6b50627f 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.drv: Keep track of pointer and device button @@ -16,10 +16,10 @@ Original patch by Andrew Eikum . 4 files changed, 106 insertions(+), 8 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index 6b876c3bee9..2c7c2e6c5be 100644 +index f1ad4b01669..5b1b892de32 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c -@@ -1876,13 +1876,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) +@@ -1880,13 +1880,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) { HWND hwnd; @@ -51,10 +51,10 @@ index 6b876c3bee9..2c7c2e6c5be 100644 } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index abd136bca02..8878a99d14e 100644 +index 2b0aece8700..82a82032957 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -26,6 +26,9 @@ +@@ -30,6 +30,9 @@ #include #include #include @@ -64,7 +64,7 @@ index abd136bca02..8878a99d14e 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H #include #endif -@@ -143,6 +146,14 @@ MAKE_FUNCPTR(XISelectEvents); +@@ -144,6 +147,14 @@ MAKE_FUNCPTR(XISelectEvents); #undef MAKE_FUNCPTR #endif @@ -79,7 +79,7 @@ index abd136bca02..8878a99d14e 100644 /*********************************************************************** * X11DRV_Xcursor_Init * -@@ -248,6 +259,70 @@ void sync_window_cursor( Window window ) +@@ -249,6 +260,70 @@ void sync_window_cursor( Window window ) set_window_cursor( window, cursor ); } @@ -150,7 +150,7 @@ index abd136bca02..8878a99d14e 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H /*********************************************************************** * update_relative_valuators -@@ -1847,6 +1922,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) +@@ -1877,6 +1952,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 abd136bca02..8878a99d14e 100644 return TRUE; } -@@ -1933,13 +2010,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) +@@ -1964,13 +2041,12 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) #endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */ @@ -174,7 +174,7 @@ index abd136bca02..8878a99d14e 100644 int event, error; void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW ); -@@ -1955,11 +2031,20 @@ void x11drv_xinput_load(void) +@@ -1986,11 +2062,20 @@ void x11drv_xinput_load(void) return; \ } @@ -196,22 +196,22 @@ index abd136bca02..8878a99d14e 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 4a1504567a1..f2ae3ecdfa3 100644 +index e342fc01cdf..16308dfab4e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -698,6 +698,7 @@ extern void retry_grab_clipping_window(void) DECLSPEC_HIDDEN; +@@ -699,6 +699,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; +extern void X11DRV_InitMouse( Display *display ) DECLSPEC_HIDDEN; - extern NTSTATUS X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, - const LARGE_INTEGER *timeout, - DWORD mask, DWORD flags ) DECLSPEC_HIDDEN; + extern BOOL X11DRV_ProcessEvents( DWORD mask ) DECLSPEC_HIDDEN; + 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 7ed0a6e3a02..33814d1f6fb 100644 +index 891a514bbcc..0197ae93978 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -685,6 +685,7 @@ static BOOL process_attach(void) +@@ -712,6 +712,7 @@ static NTSTATUS x11drv_init( void *arg ) if (use_xkb) use_xkb = XkbUseExtension( gdi_display, NULL, NULL ); #endif X11DRV_InitKeyboard( gdi_display ); @@ -220,5 +220,5 @@ index 7ed0a6e3a02..33814d1f6fb 100644 init_user_driver(); -- -2.35.1 +2.39.0 diff --git a/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch b/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch index 83f6b54e..4311ffb4 100644 --- a/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch +++ b/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch @@ -1,4 +1,4 @@ -From 2f009b87fbb30774851f31d537b921bf90d50e1f Mon Sep 17 00:00:00 2001 +From 03498b316b233944923db2098138f730c64b407d Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 10 Feb 2016 15:09:29 +0800 Subject: [PATCH] winex11.drv: Add support for _NET_ACTIVE_WINDOW. (v2) @@ -18,10 +18,10 @@ For bug #2155. 8 files changed, 67 insertions(+) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c -index 557d555d673..c8077a73e32 100644 +index 1c0708461a1..515a4db9b69 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c -@@ -828,6 +828,10 @@ static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) +@@ -824,6 +824,10 @@ static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) hdc, rect.left - dx, rect.top - dy, SRCCOPY, 0, 0 ); } @@ -32,16 +32,16 @@ index 557d555d673..c8077a73e32 100644 static void nulldrv_SetCapture( HWND hwnd, UINT flags ) { } -@@ -1190,6 +1194,7 @@ static const struct user_driver_funcs lazy_load_driver = - nulldrv_MsgWaitForMultipleObjectsEx, +@@ -1192,6 +1196,7 @@ static const struct user_driver_funcs lazy_load_driver = + nulldrv_ProcessEvents, nulldrv_ReleaseDC, nulldrv_ScrollDC, + nulldrv_SetActiveWindow, nulldrv_SetCapture, nulldrv_SetFocus, loaderdrv_SetLayeredWindowAttributes, -@@ -1264,6 +1269,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version - SET_USER_FUNC(MsgWaitForMultipleObjectsEx); +@@ -1267,6 +1272,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version + SET_USER_FUNC(ProcessEvents); SET_USER_FUNC(ReleaseDC); SET_USER_FUNC(ScrollDC); + SET_USER_FUNC(SetActiveWindow); @@ -49,10 +49,10 @@ index 557d555d673..c8077a73e32 100644 SET_USER_FUNC(SetFocus); SET_USER_FUNC(SetLayeredWindowAttributes); diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c -index fd16d03f733..8fcf1a2fb7e 100644 +index f768453594f..0863aed6bdc 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c -@@ -1635,6 +1635,8 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) +@@ -1887,6 +1887,8 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); } @@ -62,10 +62,10 @@ index fd16d03f733..8fcf1a2fb7e 100644 if (focus) { diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index 86edf66b820..f2b965706f4 100644 +index 1ae39eb9edf..3d600a2879e 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c -@@ -595,6 +595,9 @@ static void set_focus( Display *display, HWND hwnd, Time time ) +@@ -578,6 +578,9 @@ static void set_focus( Display *display, HWND hwnd, Time time ) Window win; GUITHREADINFO threadinfo; @@ -75,7 +75,7 @@ index 86edf66b820..f2b965706f4 100644 TRACE( "setting foreground window to %p\n", hwnd ); NtUserSetForegroundWindow( hwnd ); -@@ -853,6 +856,8 @@ static void focus_out( Display *display , HWND hwnd ) +@@ -836,6 +839,8 @@ static void focus_out( Display *display , HWND hwnd ) if (!focus_win) { @@ -85,11 +85,11 @@ index 86edf66b820..f2b965706f4 100644 Foreground window, because in most cases the messages sent above must have already changed the foreground window, in which diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c -index 4ebe3a16367..1afadf626a9 100644 +index e26cfb5a789..476694c6737 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c -@@ -415,6 +415,7 @@ static const struct user_driver_funcs x11drv_funcs = - .pMsgWaitForMultipleObjectsEx = X11DRV_MsgWaitForMultipleObjectsEx, +@@ -416,6 +416,7 @@ static const struct user_driver_funcs x11drv_funcs = + .pProcessEvents = X11DRV_ProcessEvents, .pReleaseDC = X11DRV_ReleaseDC, .pScrollDC = X11DRV_ScrollDC, + .pSetActiveWindow = X11DRV_SetActiveWindow, @@ -97,10 +97,10 @@ index 4ebe3a16367..1afadf626a9 100644 .pSetFocus = X11DRV_SetFocus, .pSetLayeredWindowAttributes = X11DRV_SetLayeredWindowAttributes, diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index 603314ff3bb..49ee4b75052 100644 +index 17fc6d867f5..eca4b354e50 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -2431,6 +2431,54 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) +@@ -2434,6 +2434,54 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) } @@ -156,10 +156,10 @@ index 603314ff3bb..49ee4b75052 100644 * SetCapture (X11DRV.@) */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index b394795a326..8da45e70179 100644 +index 2b0b79e1665..7c4cf136d8e 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -227,6 +227,7 @@ extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, +@@ -228,6 +228,7 @@ extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, const RECT *top_rect, DWORD flags ) DECLSPEC_HIDDEN; extern void X11DRV_ReleaseDC( HWND hwnd, HDC hdc ) DECLSPEC_HIDDEN; extern BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) DECLSPEC_HIDDEN; @@ -167,7 +167,7 @@ index b394795a326..8da45e70179 100644 extern void X11DRV_SetCapture( HWND hwnd, UINT flags ) DECLSPEC_HIDDEN; extern void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) DECLSPEC_HIDDEN; -@@ -376,6 +377,7 @@ struct x11drv_thread_data +@@ -377,6 +378,7 @@ struct x11drv_thread_data Display *display; XEvent *current_event; /* event currently being processed */ HWND grab_hwnd; /* window that currently grabs the mouse */ @@ -175,7 +175,7 @@ index b394795a326..8da45e70179 100644 HWND last_focus; /* last window that had focus */ XIM xim; /* input method */ HWND last_xic_hwnd; /* last xic window */ -@@ -484,6 +486,7 @@ enum x11drv_atoms +@@ -485,6 +487,7 @@ enum x11drv_atoms XATOM__ICC_PROFILE, XATOM__KDE_NET_WM_STATE_SKIP_SWITCHER, XATOM__MOTIF_WM_HINTS, @@ -196,11 +196,11 @@ index 797e4f92d38..d0c8d8a28e1 100644 "_NET_STARTUP_INFO", "_NET_SUPPORTED", diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h -index d074c09cceb..d45a894adf2 100644 +index dca03934a44..5801995705a 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h -@@ -310,6 +310,7 @@ struct user_driver_funcs - NTSTATUS (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,const LARGE_INTEGER*,DWORD,DWORD); +@@ -311,6 +311,7 @@ struct user_driver_funcs + BOOL (*pProcessEvents)(DWORD); void (*pReleaseDC)(HWND,HDC); BOOL (*pScrollDC)(HDC,INT,INT,HRGN); + void (*pSetActiveWindow)(HWND); diff --git a/staging/upstream-commit b/staging/upstream-commit index e8700e20..540348f1 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -2436964d5678956a362a9bef34625885442740f6 +15b176b4f4945d7abfb4adbddc7f140ba1765855