winex11-WM_WINDOWPOSCHANGING: Directly use win32u for user functions.

This commit is contained in:
Zebediah Figura 2022-04-14 17:45:48 -05:00
parent 0b3309a201
commit cc4ecadad0

View File

@ -1,18 +1,18 @@
From 59692b046e936dc25ecab6adaf258533a7404635 Mon Sep 17 00:00:00 2001
From 78775e9afb77bd36a01a4b44292d0a654c13d3de Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 27 Dec 2016 17:45:05 +0800
Subject: winex11.drv: Send WM_WINDOWPOSCHANGING/WM_WINDOWPOSCHANGED messages
to a being deactivated topmost window.
Subject: [PATCH] winex11.drv: Send WM_WINDOWPOSCHANGING/WM_WINDOWPOSCHANGED
messages to a being deactivated topmost window.
---
dlls/winex11.drv/event.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index bf2cbb07429..e38b76a7274 100644
index c1c52a4130a..d0f467a32e9 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -593,16 +593,27 @@ static void set_input_focus( struct x11drv_win_data *data )
@@ -592,16 +592,27 @@ static void set_input_focus( struct x11drv_win_data *data )
*/
static void set_focus( Display *display, HWND hwnd, Time time )
{
@ -21,7 +21,7 @@ index bf2cbb07429..e38b76a7274 100644
Window win;
GUITHREADINFO threadinfo;
+ old_active = GetForegroundWindow();
+ old_active = NtUserGetForegroundWindow();
+
/* prevent recursion */
x11drv_thread_data()->active_window = hwnd;
@ -35,12 +35,12 @@ index bf2cbb07429..e38b76a7274 100644
+ * Window Manager keeps a topmost window on top in z-oder, so there is
+ * no need to actually do anything, just send the messages.
+ */
+ if (old_active && (GetWindowLongW( old_active, GWL_EXSTYLE ) & WS_EX_TOPMOST))
+ SetWindowPos( old_active, hwnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER );
+ if (old_active && (NtUserGetWindowLongW( old_active, GWL_EXSTYLE ) & WS_EX_TOPMOST))
+ NtUserSetWindowPos( old_active, hwnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOOWNERZORDER );
+
threadinfo.cbSize = sizeof(threadinfo);
GetGUIThreadInfo(0, &threadinfo);
focus = threadinfo.hwndFocus;
--
2.11.0
2.35.1