winex11.drv: Reposition windows on desktop resize only when useful.

This will end up moving window around only if the old virtual screen
origin is different from the new one. Don't send unnecessary messages
if it didn't change.

This helps speeding up D3D tests on the testbot VMs with multiple
displays and hopefully solve the timeout problems.
This commit is contained in:
Rémi Bernon 2022-11-23 17:24:28 +01:00 committed by Alexandre Julliard
parent d6829bdcba
commit aeb43dce75

View file

@ -470,8 +470,10 @@ void X11DRV_resize_desktop(void)
virtual_rect.right - virtual_rect.left, virtual_rect.bottom - virtual_rect.top,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE );
ungrab_clipping_window();
send_message_timeout( HWND_BROADCAST, WM_X11DRV_DESKTOP_RESIZED, old_virtual_rect.left,
old_virtual_rect.top, SMTO_ABORTIFHUNG, 2000, FALSE );
if (old_virtual_rect.left != virtual_rect.left || old_virtual_rect.top != virtual_rect.top)
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 );