From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/desktop.c | 11 ++++++++++- dlls/winex11.drv/display.c | 11 ----------- 2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 6e59e8b5c13..f46a0665e4b 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -456,9 +456,10 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height) */ void X11DRV_resize_desktop(void) { + HWND foreground, hwnd = NtUserGetDesktopWindow(); RECT primary_rect, virtual_rect; - HWND hwnd = NtUserGetDesktopWindow(); INT width, height; + DWORD tid, pid;
virtual_rect = NtUserGetVirtualScreenRect(); primary_rect = NtUserGetPrimaryMonitorRect(); @@ -478,4 +479,12 @@ void X11DRV_resize_desktop(void) SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ); ungrab_clipping_window(); send_message_timeout( HWND_BROADCAST, WM_X11DRV_DESKTOP_RESIZED, 0, 0, SMTO_ABORTIFHUNG, 2000, FALSE ); + + /* 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 ); + } } 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;