Updated winex11-_NET_ACTIVE_WINDOW patchset

Thanks Gabriel Ivăncescu.
This commit is contained in:
Alistair Leslie-Hughes 2023-01-06 08:02:03 +11:00
parent d10f51a658
commit 90d6184697
2 changed files with 27 additions and 13 deletions

View File

@ -1,4 +1,4 @@
From f678ed41b4306e31b6a95282710c2bf3a5abb1be Mon Sep 17 00:00:00 2001
From 2f009b87fbb30774851f31d537b921bf90d50e1f Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 10 Feb 2016 15:09:29 +0800
Subject: [PATCH] winex11.drv: Add support for _NET_ACTIVE_WINDOW. (v2)
@ -8,13 +8,14 @@ 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 +
7 files changed, 65 insertions(+)
8 files changed, 67 insertions(+)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index 557d555d673..c8077a73e32 100644
@ -47,6 +48,19 @@ index 557d555d673..c8077a73e32 100644
SET_USER_FUNC(SetCapture);
SET_USER_FUNC(SetFocus);
SET_USER_FUNC(SetLayeredWindowAttributes);
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index fd16d03f733..8fcf1a2fb7e 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 )
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 86edf66b820..f2b965706f4 100644
--- a/dlls/winex11.drv/event.c
@ -71,10 +85,10 @@ 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 ba9aff82a06..0b80a660e9a 100644
index 4ebe3a16367..1afadf626a9 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -418,6 +418,7 @@ static const struct user_driver_funcs x11drv_funcs =
@@ -415,6 +415,7 @@ static const struct user_driver_funcs x11drv_funcs =
.pMsgWaitForMultipleObjectsEx = X11DRV_MsgWaitForMultipleObjectsEx,
.pReleaseDC = X11DRV_ReleaseDC,
.pScrollDC = X11DRV_ScrollDC,
@ -142,7 +156,7 @@ index 603314ff3bb..49ee4b75052 100644
* SetCapture (X11DRV.@)
*/
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index cd5f203c377..5e9ae21ab0d 100644
index b394795a326..8da45e70179 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,
@ -153,7 +167,7 @@ index cd5f203c377..5e9ae21ab0d 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;
@@ -377,6 +378,7 @@ struct x11drv_thread_data
@@ -376,6 +377,7 @@ struct x11drv_thread_data
Display *display;
XEvent *current_event; /* event currently being processed */
HWND grab_hwnd; /* window that currently grabs the mouse */
@ -161,7 +175,7 @@ index cd5f203c377..5e9ae21ab0d 100644
HWND last_focus; /* last window that had focus */
XIM xim; /* input method */
HWND last_xic_hwnd; /* last xic window */
@@ -485,6 +487,7 @@ enum x11drv_atoms
@@ -484,6 +486,7 @@ enum x11drv_atoms
XATOM__ICC_PROFILE,
XATOM__KDE_NET_WM_STATE_SKIP_SWITCHER,
XATOM__MOTIF_WM_HINTS,
@ -194,5 +208,5 @@ index d074c09cceb..d45a894adf2 100644
void (*pSetFocus)(HWND);
void (*pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
--
2.38.1
2.39.0

View File

@ -1,4 +1,4 @@
From 49cc6f9c79195d243f0e8d035267d9734708e5a5 Mon Sep 17 00:00:00 2001
From 7f524fa9868f4707d6c30af6692283dfc18e647e Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 6 Apr 2016 15:14:25 +0800
Subject: [PATCH] user32: Before asking a WM to activate a window make sure
@ -10,10 +10,10 @@ This patch fixes iconify action using WM's taskbar buttons for Winamp.
1 file changed, 4 insertions(+)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index ade8c313423..dda2a750275 100644
index 8fcf1a2fb7e..ad7afdfcc68 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1377,6 +1377,10 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -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 );
@ -23,7 +23,7 @@ index ade8c313423..dda2a750275 100644
+
}
/* now change focus if necessary */
user_driver->pSetActiveWindow( hwnd );
--
2.35.1
2.39.0