Added user32-alttab-focus patchset

This commit is contained in:
Alistair Leslie-Hughes
2022-05-04 12:21:48 +10:00
parent 0f597ea71c
commit 9c37968a29
3 changed files with 71 additions and 14 deletions

View File

@@ -0,0 +1,26 @@
From 068536823c008835d9d96af2ae2cb030e753dd7f Mon Sep 17 00:00:00 2001
From: David Torok <dt@zeroitlab.com>
Date: Sun, 17 Nov 2019 19:08:12 +0100
Subject: [PATCH] Send WM_NCPOINTERUP on focus regain
---
dlls/win32u/input.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index dda2a750275..05efec915b2 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 )
send_message( hwnd, WM_ACTIVATE,
MAKEWPARAM( mouse ? WA_CLICKACTIVE : WA_ACTIVE, is_iconic(hwnd) ),
(LPARAM)previous );
+
+ send_message( hwnd, WM_NCPOINTERUP, 0, 0);
+
if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window())
NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
--
2.35.1

View File

@@ -0,0 +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.