[WINLOGON] WlxSwitchDesktopToUser/Winlogon(): ensure the calling thread is assigned the specified desktop (#8130)

Invoke SetThreadDesktop() after a successful SwitchDesktop() call.
This commit is contained in:
Hermès Bélusca-Maïto 2025-06-12 22:41:41 +02:00
parent 14894f2e27
commit b3e56c95ef
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -411,10 +411,14 @@ WlxSwitchDesktopToUser(
HANDLE hWlx)
{
PWLSESSION Session = (PWLSESSION)hWlx;
BOOL bRet;
TRACE("WlxSwitchDesktopToUser()\n");
return (int)SwitchDesktop(Session->ApplicationDesktop);
bRet = SwitchDesktop(Session->ApplicationDesktop);
if (bRet)
SetThreadDesktop(Session->ApplicationDesktop);
return (int)bRet;
}
/*
@ -426,10 +430,14 @@ WlxSwitchDesktopToWinlogon(
HANDLE hWlx)
{
PWLSESSION Session = (PWLSESSION)hWlx;
BOOL bRet;
TRACE("WlxSwitchDesktopToWinlogon()\n");
return (int)SwitchDesktop(Session->WinlogonDesktop);
bRet = SwitchDesktop(Session->WinlogonDesktop);
if (bRet)
SetThreadDesktop(Session->WinlogonDesktop);
return (int)bRet;
}
/*