diff --git a/patches/winex11-WM_WINDOWPOSCHANGING/0001-winex11.drv-Send-WM_WINDOWPOSCHANGING-WM_WINDOWPOSCH.patch b/patches/winex11-WM_WINDOWPOSCHANGING/0001-winex11.drv-Send-WM_WINDOWPOSCHANGING-WM_WINDOWPOSCH.patch index 58ade870..4895d48c 100644 --- a/patches/winex11-WM_WINDOWPOSCHANGING/0001-winex11.drv-Send-WM_WINDOWPOSCHANGING-WM_WINDOWPOSCH.patch +++ b/patches/winex11-WM_WINDOWPOSCHANGING/0001-winex11.drv-Send-WM_WINDOWPOSCHANGING-WM_WINDOWPOSCH.patch @@ -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 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