Module: wine Branch: master Commit: a0cd5e053bbd9ca9f124186c7da27605026ad7e5 URL: https://gitlab.winehq.org/wine/wine/-/commit/a0cd5e053bbd9ca9f124186c7da2760...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu Jun 29 12:47:05 2023 +0200
win32u: Update the display cache when virtual desktop mode changes.
We update the cache in NtUserCreateDesktopEx, as it may change existing thread desktop flags, but we need to do it as well when a new desktop is created while still detached, then attached to a thread through NtUserSetThreadDesktop.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55146
---
dlls/win32u/winstation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/winstation.c b/dlls/win32u/winstation.c index 9b97a4b4076..f99bef2bf11 100644 --- a/dlls/win32u/winstation.c +++ b/dlls/win32u/winstation.c @@ -248,7 +248,7 @@ HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ) */ BOOL WINAPI NtUserSetThreadDesktop( HDESK handle ) { - BOOL ret; + BOOL ret, was_virtual_desktop = is_virtual_desktop();
SERVER_START_REQ( set_thread_desktop ) { @@ -264,6 +264,7 @@ BOOL WINAPI NtUserSetThreadDesktop( HDESK handle ) thread_info->client_info.top_window = 0; thread_info->client_info.msg_window = 0; if (key_state_info) key_state_info->time = 0; + if (was_virtual_desktop != is_virtual_desktop()) update_display_cache( TRUE ); } return ret; }