From c70b34e3239359fd48f4ddd329f7e8e3d881a9d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Bernon?= Date: Wed, 28 Sep 2022 12:01:00 +0200 Subject: [PATCH] winex11.drv: Send WM_X11DRV_CLIP_CURSOR_REQUEST message from the deskop. Using send_notify_message directly, which calls clip_fullscreen_window synchronously if the target thread is the same. --- dlls/winex11.drv/desktop.c | 3 +++ dlls/winex11.drv/display.c | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index b912c519947..721e805f820 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -482,5 +482,8 @@ void X11DRV_resize_desktop(void) send_message_timeout( HWND_BROADCAST, WM_X11DRV_DESKTOP_RESIZED, old_virtual_rect.left, old_virtual_rect.top, SMTO_ABORTIFHUNG, 2000, FALSE ); + /* forward clip_fullscreen_window request to the foreground window */ + send_notify_message( NtUserGetForegroundWindow(), WM_X11DRV_CLIP_CURSOR_REQUEST, TRUE, TRUE ); + old_virtual_rect = virtual_rect; } diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index b552c52cb56..87f7adb76d2 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -560,20 +560,9 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void) void X11DRV_DisplayDevices_Update(void) { - DWORD tid, pid; - HWND foreground; - X11DRV_DisplayDevices_Init(TRUE); X11DRV_resize_desktop(); - - /* forward clip_fullscreen_window request to the foreground window */ - if ((foreground = NtUserGetForegroundWindow()) && - (tid = NtUserGetWindowThread( foreground, &pid )) && pid == GetCurrentProcessId()) - { - if (tid == GetCurrentThreadId()) clip_fullscreen_window( foreground, TRUE ); - else send_notify_message( foreground, WM_X11DRV_CLIP_CURSOR_REQUEST, TRUE, TRUE ); - } } static BOOL force_display_devices_refresh; -- 2.11.4.GIT