diff --git a/patches/ntdll-Junction_Points/0007-kernelbase-Add-support-for-deleting-reparse-points-w.patch b/patches/ntdll-Junction_Points/0007-kernelbase-Add-support-for-deleting-reparse-points-w.patch index 1ccf6c26..7d0d122d 100644 --- a/patches/ntdll-Junction_Points/0007-kernelbase-Add-support-for-deleting-reparse-points-w.patch +++ b/patches/ntdll-Junction_Points/0007-kernelbase-Add-support-for-deleting-reparse-points-w.patch @@ -1,7 +1,8 @@ -From 03c96b5a2e215a7aa7d8c74ca3fbb5794fdcc95f Mon Sep 17 00:00:00 2001 +From afd4ad0f6725f49daaa0fe2351c98faa6a57519a Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:52:51 -0700 -Subject: kernelbase: Add support for deleting reparse points with DeleteFile. +Subject: [PATCH] kernelbase: Add support for deleting reparse points with + DeleteFile. Signed-off-by: Erich E. Hoover --- @@ -10,11 +11,11 @@ Signed-off-by: Erich E. Hoover 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 6214f549406..17c25eb5858 100644 +index 36b43d345d6..b7d16410d75 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -993,7 +993,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path ) - +@@ -1002,7 +1002,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path ) + InitializeObjectAttributes( &attr, &nameW, OBJ_CASE_INSENSITIVE, 0, NULL ); status = NtCreateFile(&hFile, SYNCHRONIZE | DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0); @@ -24,10 +25,10 @@ index 6214f549406..17c25eb5858 100644 RtlFreeUnicodeString( &nameW ); diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index f3aad01ee93..4e3f0f04a3e 100644 +index d4833d84906..598fdc77830 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -5367,7 +5367,7 @@ static void test_reparse_points(void) +@@ -6007,7 +6007,7 @@ static void test_reparse_points(void) REPARSE_GUID_DATA_BUFFER guid_buffer; static const WCHAR dotW[] = {'.',0}; REPARSE_DATA_BUFFER *buffer = NULL; @@ -36,7 +37,7 @@ index f3aad01ee93..4e3f0f04a3e 100644 IO_STATUS_BLOCK iosb; UNICODE_STRING nameW; HANDLE handle; -@@ -5532,7 +5532,14 @@ static void test_reparse_points(void) +@@ -6172,7 +6172,14 @@ static void test_reparse_points(void) bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0); ok(bret, "Failed to create junction point! (0x%lx)\n", GetLastError()); CloseHandle(handle); @@ -53,5 +54,5 @@ index f3aad01ee93..4e3f0f04a3e 100644 cleanup: /* Cleanup */ -- -2.17.1 +2.47.2 diff --git a/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch b/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch index 290995f4..efc40835 100644 --- a/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch +++ b/patches/ntdll-Junction_Points/0009-kernelbase-Add-support-for-moving-reparse-points-wit.patch @@ -1,4 +1,4 @@ -From 762d7992e4a328d9fd94e3960c98951ead0e1a0a Mon Sep 17 00:00:00 2001 +From a34c3f550b16e84f907c637514f0645456420d65 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 6 Feb 2021 12:46:30 -0700 Subject: [PATCH] kernelbase: Add support for moving reparse points with @@ -13,11 +13,11 @@ Signed-off-by: Erich E. Hoover 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index abec5367512..d7c3797d4a9 100644 +index b7d16410d75..dccae6cb565 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c -@@ -2580,7 +2580,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const - +@@ -2514,7 +2514,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const + InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL ); status = NtOpenFile( &source_handle, DELETE | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - FILE_SYNCHRONOUS_IO_NONALERT ); @@ -26,10 +26,10 @@ index abec5367512..d7c3797d4a9 100644 if (!set_ntstatus( status )) goto error; diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index a25b6820291..70b10c56ea0 100644 +index 8b561e162e8..7b6e2776947 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -5666,7 +5666,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags, +@@ -6021,7 +6021,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags, static void test_reparse_points(void) { @@ -39,7 +39,7 @@ index a25b6820291..70b10c56ea0 100644 static const WCHAR reparseW[] = {'\\','r','e','p','a','r','s','e',0}; static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0}; static const WCHAR parentW[] = {'\\','.','.','\\',0}; -@@ -6037,6 +6038,15 @@ static void test_reparse_points(void) +@@ -6392,6 +6393,15 @@ static void test_reparse_points(void) wine_dbgstr_w(dest), wine_dbgstr_w(rel_target)); CloseHandle(handle); @@ -56,10 +56,10 @@ index a25b6820291..70b10c56ea0 100644 /* Cleanup */ pRtlFreeUnicodeString(&nameW); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c -index 1b35463e069..d2e57f5a127 100644 +index d3045c6c936..49afb57b2b6 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c -@@ -5395,8 +5395,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -5556,8 +5556,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, { FILE_RENAME_INFORMATION *info = ptr; unsigned int flags; @@ -70,7 +70,7 @@ index 1b35463e069..d2e57f5a127 100644 char *unix_name; if (class == FileRenameInformation) -@@ -5413,6 +5415,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -5574,6 +5576,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, InitializeObjectAttributes( &attr, &name_str, OBJ_CASE_INSENSITIVE, info->RootDirectory, NULL ); get_redirect( &attr, &redir ); @@ -90,7 +90,7 @@ index 1b35463e069..d2e57f5a127 100644 status = nt_to_unix_file_name( &attr, &unix_name, FILE_OPEN_IF ); if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE) { -@@ -5429,9 +5444,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, +@@ -5590,9 +5605,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, } SERVER_END_REQ; @@ -106,10 +106,10 @@ index 1b35463e069..d2e57f5a127 100644 else status = STATUS_INVALID_PARAMETER_3; break; diff --git a/server/fd.c b/server/fd.c -index b0cbf28d543..5f1b4ac3114 100644 +index dd6a61c557d..dde92beb664 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -2695,7 +2695,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2724,7 +2724,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da goto failed; } @@ -118,7 +118,7 @@ index b0cbf28d543..5f1b4ac3114 100644 { if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev) { -@@ -2711,7 +2711,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2740,7 +2740,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da } /* can't replace directories or special files */ @@ -127,7 +127,7 @@ index b0cbf28d543..5f1b4ac3114 100644 { set_error( STATUS_ACCESS_DENIED ); goto failed; -@@ -2769,6 +2769,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da +@@ -2806,6 +2806,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen ); free( fd->unix_name ); fd->closed->unix_name = fd->unix_name = realpath( name, NULL ); @@ -137,5 +137,5 @@ index b0cbf28d543..5f1b4ac3114 100644 if (!fd->unix_name) set_error( STATUS_NO_MEMORY ); -- -2.42.0 +2.47.2 diff --git a/patches/user32-alttab-focus/0001-Send-WM_NCPOINTERUP-on-focus-regain.patch b/patches/user32-alttab-focus/0001-Send-WM_NCPOINTERUP-on-focus-regain.patch index 23965c85..0dfacaea 100644 --- a/patches/user32-alttab-focus/0001-Send-WM_NCPOINTERUP-on-focus-regain.patch +++ b/patches/user32-alttab-focus/0001-Send-WM_NCPOINTERUP-on-focus-regain.patch @@ -1,4 +1,4 @@ -From 068536823c008835d9d96af2ae2cb030e753dd7f Mon Sep 17 00:00:00 2001 +From fb66d84bc6b98c261d6219b29923b9b7590766d6 Mon Sep 17 00:00:00 2001 From: David Torok Date: Sun, 17 Nov 2019 19:08:12 +0100 Subject: [PATCH] Send WM_NCPOINTERUP on focus regain @@ -8,10 +8,10 @@ Subject: [PATCH] Send WM_NCPOINTERUP on focus regain 1 file changed, 3 insertions(+) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c -index dda2a750275..05efec915b2 100644 +index 81c29af9b96..f1c5e418e00 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c -@@ -1375,6 +1375,9 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) +@@ -2016,6 +2016,9 @@ BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus, DWORD new send_message( hwnd, WM_ACTIVATE, MAKEWPARAM( mouse ? WA_CLICKACTIVE : WA_ACTIVE, is_iconic(hwnd) ), (LPARAM)previous ); @@ -20,7 +20,7 @@ index dda2a750275..05efec915b2 100644 + if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window()) NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); - + } -- -2.35.1 +2.47.2 diff --git a/patches/user32-alttab-focus/definition b/patches/user32-alttab-focus/definition index b6269641..9580fcc9 100644 --- a/patches/user32-alttab-focus/definition +++ b/patches/user32-alttab-focus/definition @@ -1,5 +1,5 @@ Fixes: [48121] Improve Alt+tab for unity games. -Depends: winex11-_NET_ACTIVE_WINDOW + # The other patches on this bug are other solutions but # might cause errors if they dont recieve the HTCAPTION # message. 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 d2e0db6d..a22bfb5f 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 14dc22e926e64a1ab824278ba245caabe7e1449b Mon Sep 17 00:00:00 2001 +From fbd5deecb137fa6ef4b0161266d3fb4b157ad069 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 51b453b9af4..7dcc220aecb 100644 +index 1923499cf9c..3c4b09d61fb 100644 --- a/configure.ac +++ b/configure.ac -@@ -1209,6 +1209,7 @@ then +@@ -1231,6 +1231,7 @@ then dnl *** All of the following tests require X11/Xlib.h AC_CHECK_HEADERS([X11/extensions/shape.h \ @@ -29,10 +29,10 @@ index 51b453b9af4..7dcc220aecb 100644 X11/extensions/XShm.h \ X11/extensions/Xfixes.h \ diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c -index 7b7371ed696..fdca9d67e0b 100644 +index 8a5ef62f57d..24188e25d98 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c -@@ -1820,11 +1820,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags) +@@ -1825,11 +1825,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags) return TRUE; } @@ -45,7 +45,7 @@ index 7b7371ed696..fdca9d67e0b 100644 { HWND hwnd; -@@ -1838,6 +1834,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) +@@ -1843,6 +1839,24 @@ BOOL X11DRV_MappingNotify( HWND dummy, XEvent *event ) return TRUE; } @@ -71,7 +71,7 @@ index 7b7371ed696..fdca9d67e0b 100644 /*********************************************************************** * VkKeyScanEx (X11DRV.@) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 501a8e5ebc2..ad8b86c1e61 100644 +index cbf5835b75c..59a9835e9b4 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -31,6 +31,9 @@ @@ -175,7 +175,7 @@ index 501a8e5ebc2..ad8b86c1e61 100644 #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H /*********************************************************************** * update_relative_valuators -@@ -1664,6 +1744,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev ) +@@ -1670,6 +1750,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 501a8e5ebc2..ad8b86c1e61 100644 return TRUE; } -@@ -1812,7 +1894,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev ) +@@ -1818,7 +1900,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev ) */ void x11drv_xinput2_load(void) { @@ -193,7 +193,7 @@ index 501a8e5ebc2..ad8b86c1e61 100644 int event, error; void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW ); -@@ -1828,11 +1910,20 @@ void x11drv_xinput2_load(void) +@@ -1834,11 +1916,20 @@ void x11drv_xinput2_load(void) return; \ } @@ -215,22 +215,22 @@ index 501a8e5ebc2..ad8b86c1e61 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 625e37eecc5..fbc7efc4ffa 100644 +index 75dd3c1711a..f48c3782e53 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -701,6 +701,7 @@ extern void reapply_cursor_clipping(void); +@@ -719,6 +719,7 @@ extern void reapply_cursor_clipping(void); extern void ungrab_clipping_window(void); 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); + typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void *arg ); diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index 7f05acccea6..40157645c53 100644 +index e27202eb2bf..629c8fc172c 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 ) +@@ -669,6 +669,7 @@ static NTSTATUS x11drv_init( void *arg ) XkbUseExtension( gdi_display, NULL, NULL ); X11DRV_InitKeyboard( gdi_display ); @@ -239,5 +239,5 @@ index 7f05acccea6..40157645c53 100644 init_user_driver(); -- -2.45.2 +2.47.2 diff --git a/patches/user32-rawinput-mouse/0006-winex11-Listen-to-Raw-Motion-Button-events-in-the-de.patch b/patches/user32-rawinput-mouse/0006-winex11-Listen-to-Raw-Motion-Button-events-in-the-de.patch index 08796093..e4c7c260 100644 --- a/patches/user32-rawinput-mouse/0006-winex11-Listen-to-Raw-Motion-Button-events-in-the-de.patch +++ b/patches/user32-rawinput-mouse/0006-winex11-Listen-to-Raw-Motion-Button-events-in-the-de.patch @@ -1,8 +1,8 @@ -From 1c3132e5307aead682883f5f7613d5811d38b53a Mon Sep 17 00:00:00 2001 +From 55847e702591ebe10754ab4789ebc48c7c036181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 25 Oct 2021 11:45:47 +0200 -Subject: [PATCH 6/7] winex11: Listen to Raw(Motion|Button) events in the - desktop thread. +Subject: [PATCH] winex11: Listen to Raw(Motion|Button) events in the desktop + thread. We still need to send "normal" input from the clipping window thread to trigger low-level hooks callbacks when clipping cursor. This is for @@ -15,10 +15,10 @@ instance used in our dinput implementation. 4 files changed, 81 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index 8b02361aaff..f4e290f8b8f 100644 +index a9e9f25b422..da0e2362d10 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c -@@ -315,6 +315,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE +@@ -378,6 +378,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE */ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) { @@ -29,7 +29,7 @@ index 8b02361aaff..f4e290f8b8f 100644 switch (prev->type) { case ConfigureNotify: -@@ -346,19 +350,21 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) +@@ -409,19 +413,21 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) case GenericEvent: if (next->xcookie.extension != xinput2_opcode) break; if (next->xcookie.evtype != XI_RawMotion) break; @@ -54,10 +54,10 @@ index 8b02361aaff..f4e290f8b8f 100644 #endif } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index f10d3cfb2d6..6557331df22 100644 +index 59a9835e9b4..9107ecaaadc 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c -@@ -343,6 +343,7 @@ static void update_relative_valuators( XIAnyClassInfo **classes, int num_classes +@@ -348,6 +348,7 @@ static void update_relative_valuators( XIAnyClassInfo **classes, int num_classes */ void x11drv_xinput2_enable( Display *display, Window window ) { @@ -65,7 +65,7 @@ index f10d3cfb2d6..6557331df22 100644 XIEventMask mask; unsigned char mask_bits[XIMaskLen(XI_LASTEVENT)]; -@@ -357,7 +358,13 @@ void x11drv_xinput2_enable( Display *display, Window window ) +@@ -362,7 +363,13 @@ void x11drv_xinput2_enable( Display *display, Window window ) { XISetMask( mask_bits, XI_DeviceChanged ); XISetMask( mask_bits, XI_RawMotion ); @@ -80,7 +80,7 @@ index f10d3cfb2d6..6557331df22 100644 } else { -@@ -375,10 +382,12 @@ void x11drv_xinput2_enable( Display *display, Window window ) +@@ -380,10 +387,12 @@ void x11drv_xinput2_enable( Display *display, Window window ) */ void x11drv_xinput2_disable( Display *display, Window window ) { @@ -93,7 +93,7 @@ index f10d3cfb2d6..6557331df22 100644 mask.mask = mask_bits; mask.mask_len = sizeof(mask_bits); -@@ -632,7 +641,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -634,7 +643,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU { struct x11drv_thread_data *thread_data = x11drv_thread_data(); if (!thread_data->clipping_cursor || thread_data->clip_window != window) return; @@ -102,7 +102,7 @@ index f10d3cfb2d6..6557331df22 100644 return; } -@@ -659,7 +668,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU +@@ -658,7 +667,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU SERVER_END_REQ; } @@ -111,7 +111,7 @@ index f10d3cfb2d6..6557331df22 100644 } #ifdef SONAME_LIBXCURSOR -@@ -1602,7 +1611,7 @@ void move_resize_window( HWND hwnd, int dir ) +@@ -1597,7 +1606,7 @@ void move_resize_window( HWND hwnd, int dir, POINT pos ) input.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; input.mi.time = NtGetTickCount(); input.mi.dwExtraInfo = 0; @@ -120,7 +120,7 @@ index f10d3cfb2d6..6557331df22 100644 } while (NtUserPeekMessage( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1830,6 +1839,8 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) +@@ -1831,6 +1840,8 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input ) */ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) { @@ -129,7 +129,7 @@ index f10d3cfb2d6..6557331df22 100644 XIRawEvent *event = xev->data; INPUT input; -@@ -1849,7 +1860,55 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) +@@ -1850,7 +1861,55 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) if (!map_raw_event_coords( event, &input )) return FALSE; if (!(input.mi.dwFlags & MOUSEEVENTF_MOVE)) return FALSE; @@ -186,7 +186,7 @@ index f10d3cfb2d6..6557331df22 100644 return TRUE; } -@@ -1964,6 +2023,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) +@@ -1965,6 +2024,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) case XI_RawMotion: ret = X11DRV_RawMotion( event ); break; @@ -198,10 +198,10 @@ index f10d3cfb2d6..6557331df22 100644 case XI_TouchBegin: case XI_TouchUpdate: diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index cbe4fc197d1..03ad33060ae 100644 +index 51b64e8e83c..813480e7e95 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -2040,6 +2040,10 @@ BOOL X11DRV_CreateWindow( HWND hwnd ) +@@ -2446,6 +2446,10 @@ BOOL X11DRV_CreateWindow( HWND hwnd ) struct x11drv_thread_data *data = x11drv_init_thread_data(); XSetWindowAttributes attr; @@ -213,17 +213,17 @@ index cbe4fc197d1..03ad33060ae 100644 attr.override_redirect = TRUE; attr.event_mask = StructureNotifyMask | FocusChangeMask; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 655c6847b92..37bd1d9d91c 100644 +index f48c3782e53..5786d0152af 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -395,6 +395,7 @@ struct x11drv_thread_data +@@ -407,6 +407,7 @@ struct x11drv_thread_data XIValuatorClassInfo x_valuator; XIValuatorClassInfo y_valuator; int xinput2_pointer; /* XInput2 master pointer device id */ + int xinput2_rawinput; /* XInput2 rawinput-only thread */ #endif /* HAVE_X11_EXTENSIONS_XINPUT2_H */ - }; + struct display_state desired_state; /* display state tracking the desired / win32 state */ -- -2.43.0 +2.47.2 diff --git a/patches/winex11-WM_WINDOWPOSCHANGING/definition b/patches/winex11-WM_WINDOWPOSCHANGING/definition index ba4c8c5e..3908cc42 100644 --- a/patches/winex11-WM_WINDOWPOSCHANGING/definition +++ b/patches/winex11-WM_WINDOWPOSCHANGING/definition @@ -1,2 +1,2 @@ Fixes: [34594] Fix handling of WM_WINDOWPOS{CHANGING,CHANGED} for deactivated topmost window -Depends: winex11-_NET_ACTIVE_WINDOW +Disabled: True 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 deleted file mode 100644 index c0dcbe72..00000000 --- a/patches/winex11-_NET_ACTIVE_WINDOW/0001-winex11.drv-Add-support-for-_NET_ACTIVE_WINDOW.patch +++ /dev/null @@ -1,212 +0,0 @@ -From 2ba1060e4e92ad1b77c1a183ab167912dc8b38d8 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) - -And use it as a backend in user32.SetActiveWindow(). - -For bug #2155. ---- - dlls/win32u/driver.c | 6 +++++ - dlls/win32u/input.c | 2 ++ - dlls/winex11.drv/event.c | 5 ++++ - dlls/winex11.drv/init.c | 1 + - dlls/winex11.drv/window.c | 48 ++++++++++++++++++++++++++++++++++ - dlls/winex11.drv/x11drv.h | 3 +++ - dlls/winex11.drv/x11drv_main.c | 1 + - include/wine/gdi_driver.h | 1 + - 8 files changed, 67 insertions(+) - -diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c -index e6a24d1a46c..d5865eff545 100644 ---- a/dlls/win32u/driver.c -+++ b/dlls/win32u/driver.c -@@ -837,6 +837,10 @@ static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) - hdc, rect.left - dx, rect.top - dy, SRCCOPY, 0, 0 ); - } - -+static void nulldrv_SetActiveWindow( HWND hwnd ) -+{ -+} -+ - static void nulldrv_SetCapture( HWND hwnd, UINT flags ) - { - } -@@ -1240,6 +1244,7 @@ static const struct user_driver_funcs lazy_load_driver = - nulldrv_ProcessEvents, - nulldrv_ReleaseDC, - nulldrv_ScrollDC, -+ nulldrv_SetActiveWindow, - nulldrv_SetCapture, - loaderdrv_SetDesktopWindow, - nulldrv_SetFocus, -@@ -1319,6 +1324,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); - SET_USER_FUNC(SetCapture); - SET_USER_FUNC(SetDesktopWindow); - SET_USER_FUNC(SetFocus); -diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c -index 3e6e440de93..1aec4073561 100644 ---- a/dlls/win32u/input.c -+++ b/dlls/win32u/input.c -@@ -1920,6 +1920,8 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); - } - -+ user_driver->pSetActiveWindow( hwnd ); -+ - /* now change focus if necessary */ - if (focus) - { -diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index 97bec34b0ea..b5f05bd108f 100644 ---- a/dlls/winex11.drv/event.c -+++ b/dlls/winex11.drv/event.c -@@ -576,6 +576,9 @@ static void set_focus( Display *display, HWND hwnd, Time time ) - Window win; - GUITHREADINFO threadinfo; - -+ /* prevent recursion */ -+ x11drv_thread_data()->active_window = hwnd; -+ - TRACE( "setting foreground window to %p\n", hwnd ); - NtUserSetForegroundWindow( hwnd ); - -@@ -820,6 +823,8 @@ static void focus_out( Display *display , HWND hwnd ) - - if (!is_current_process_focused()) - { -+ x11drv_thread_data()->active_window = 0; -+ - /* Abey : 6-Oct-99. Check again if the focus out window is the - 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 c3d54da1d4d..dfacff602f9 100644 ---- a/dlls/winex11.drv/init.c -+++ b/dlls/winex11.drv/init.c -@@ -417,6 +417,7 @@ static const struct user_driver_funcs x11drv_funcs = - .pProcessEvents = X11DRV_ProcessEvents, - .pReleaseDC = X11DRV_ReleaseDC, - .pScrollDC = X11DRV_ScrollDC, -+ .pSetActiveWindow = X11DRV_SetActiveWindow, - .pSetCapture = X11DRV_SetCapture, - .pSetDesktopWindow = X11DRV_SetDesktopWindow, - .pSetFocus = X11DRV_SetFocus, -diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index 53982bb8c3b..f6769a695d4 100644 ---- a/dlls/winex11.drv/window.c -+++ b/dlls/winex11.drv/window.c -@@ -2467,6 +2467,54 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ) - } - - -+/*********************************************************************** -+ * SetActiveWindow (X11DRV.@) -+ */ -+void X11DRV_SetActiveWindow( HWND hwnd ) -+{ -+ struct x11drv_thread_data *thread_data = x11drv_init_thread_data(); -+ struct x11drv_win_data *data; -+ -+ TRACE("%p\n", hwnd); -+ -+ if (thread_data->active_window == hwnd) -+ { -+ TRACE("ignoring activation for already active window %p\n", hwnd); -+ return; -+ } -+ -+ if (!(data = get_win_data( hwnd ))) return; -+ -+ if (data->managed) -+ { -+ XEvent xev; -+ struct x11drv_win_data *active = get_win_data( thread_data->active_window ); -+ DWORD timestamp = NtUserGetThreadInfo()->message_time - EVENT_x11_time_to_win32_time( 0 ); -+ -+ TRACE("setting _NET_ACTIVE_WINDOW to %p/%lx, current active %p/%lx\n", -+ data->hwnd, data->whole_window, active ? active->hwnd : NULL, active ? active->whole_window : 0 ); -+ -+ xev.xclient.type = ClientMessage; -+ xev.xclient.window = data->whole_window; -+ xev.xclient.message_type = x11drv_atom(_NET_ACTIVE_WINDOW); -+ xev.xclient.serial = 0; -+ xev.xclient.display = data->display; -+ xev.xclient.send_event = True; -+ xev.xclient.format = 32; -+ -+ xev.xclient.data.l[0] = 1; /* source: application */ -+ xev.xclient.data.l[1] = timestamp; -+ xev.xclient.data.l[2] = active ? active->whole_window : 0; -+ xev.xclient.data.l[3] = 0; -+ xev.xclient.data.l[4] = 0; -+ XSendEvent( data->display, root_window, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev ); -+ -+ if (active) release_win_data( active ); -+ } -+ -+ release_win_data( data ); -+} -+ - /*********************************************************************** - * SetCapture (X11DRV.@) - */ -diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 2917579927c..81605a8a483 100644 ---- a/dlls/winex11.drv/x11drv.h -+++ b/dlls/winex11.drv/x11drv.h -@@ -231,6 +231,7 @@ extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, - const RECT *top_rect, DWORD flags ); - extern void X11DRV_ReleaseDC( HWND hwnd, HDC hdc ); - extern BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, HRGN update ); -+extern void X11DRV_SetActiveWindow( HWND hwnd ); - extern void X11DRV_SetCapture( HWND hwnd, UINT flags ); - extern void X11DRV_SetDesktopWindow( HWND hwnd ); - extern void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, -@@ -381,6 +382,7 @@ struct x11drv_thread_data - Display *display; - XEvent *current_event; /* event currently being processed */ - HWND grab_hwnd; /* window that currently grabs the mouse */ -+ HWND active_window; /* active window */ - HWND last_focus; /* last window that had focus */ - HWND keymapnotify_hwnd; /* window that should receive modifier release events */ - XIM xim; /* input method */ -@@ -486,6 +488,7 @@ enum x11drv_atoms - XATOM__ICC_PROFILE, - XATOM__KDE_NET_WM_STATE_SKIP_SWITCHER, - XATOM__MOTIF_WM_HINTS, -+ XATOM__NET_ACTIVE_WINDOW, - XATOM__NET_STARTUP_INFO_BEGIN, - XATOM__NET_STARTUP_INFO, - XATOM__NET_SUPPORTED, -diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index 32a20e0e4f2..c12905f0ded 100644 ---- a/dlls/winex11.drv/x11drv_main.c -+++ b/dlls/winex11.drv/x11drv_main.c -@@ -153,6 +153,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = - "_ICC_PROFILE", - "_KDE_NET_WM_STATE_SKIP_SWITCHER", - "_MOTIF_WM_HINTS", -+ "_NET_ACTIVE_WINDOW", - "_NET_STARTUP_INFO_BEGIN", - "_NET_STARTUP_INFO", - "_NET_SUPPORTED", -diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h -index aa59a256482..7765c671bc4 100644 ---- a/include/wine/gdi_driver.h -+++ b/include/wine/gdi_driver.h -@@ -320,6 +320,7 @@ struct user_driver_funcs - BOOL (*pProcessEvents)(DWORD); - void (*pReleaseDC)(HWND,HDC); - BOOL (*pScrollDC)(HDC,INT,INT,HRGN); -+ void (*pSetActiveWindow)(HWND); - void (*pSetCapture)(HWND,UINT); - void (*pSetDesktopWindow)(HWND); - void (*pSetFocus)(HWND); --- -2.42.0 - diff --git a/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch b/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch deleted file mode 100644 index 45c280e7..00000000 --- a/patches/winex11-_NET_ACTIVE_WINDOW/0002-user32-Before-asking-a-WM-to-activate-a-window-make-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7f524fa9868f4707d6c30af6692283dfc18e647e Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Wed, 6 Apr 2016 15:14:25 +0800 -Subject: [PATCH] user32: Before asking a WM to activate a window make sure - that the window is in foreground and not minimized. - -This patch fixes iconify action using WM's taskbar buttons for Winamp. ---- - dlls/win32u/input.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c -index 8fcf1a2fb7e..ad7afdfcc68 100644 ---- a/dlls/win32u/input.c -+++ b/dlls/win32u/input.c -@@ -1633,6 +1633,10 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) - (LPARAM)previous ); - if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window()) - NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd ); -+ -+ if (hwnd == NtUserGetForegroundWindow() && !is_iconic( hwnd )) -+ NtUserSetActiveWindow( hwnd ); -+ - } - - user_driver->pSetActiveWindow( hwnd ); --- -2.39.0 - diff --git a/patches/winex11-_NET_ACTIVE_WINDOW/definition b/patches/winex11-_NET_ACTIVE_WINDOW/definition deleted file mode 100644 index e9edd04f..00000000 --- a/patches/winex11-_NET_ACTIVE_WINDOW/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [2155] Forward activate window requests to WM using _NET_ACTIVE_WINDOW 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 7f38239b..787465af 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 f286821dd241e169a7a2146ac23b7200b66a645a Mon Sep 17 00:00:00 2001 +From 2978e6662dd8919af8a9a048106f0ec574b10544 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,11 +22,11 @@ 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 22c15c35468..b48bc13df7c 100644 +index 910befa2675..24a640a14be 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -345,6 +345,25 @@ static BOOL has_owned_popups( HWND hwnd ) - return ret; +@@ -389,6 +389,25 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) + return data; } +static BOOL is_actual_window_rect_mapped(const struct x11drv_win_data *data) @@ -50,8 +50,8 @@ index 22c15c35468..b48bc13df7c 100644 + /*********************************************************************** - * alloc_win_data -@@ -2995,7 +3014,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN + * is_window_managed +@@ -2969,7 +2988,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)) || @@ -59,8 +59,8 @@ index 22c15c35468..b48bc13df7c 100644 + (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ) & + !is_actual_window_rect_mapped( data ))) { + window_set_wm_state( data, WithdrawnState ); release_win_data( data ); - unmap_window( hwnd ); -- -2.45.2 +2.47.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index a3075677..6ebd1c33 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -3379ee2e6b5f610b9f82d31be9417095372ebc5e +cf6bdfd2260b4e2a29e72a241ad60f6f39712fa3