Windows: Correctly detect switch user and RDP disconnect as session locking so that autodismount could be performed when it's enabled in the preferences

This commit is contained in:
Mounir IDRASSI 2015-05-20 07:10:18 +02:00
parent 138d22a254
commit 32ba1ebcff

View File

@ -5761,7 +5761,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case WM_WTSSESSION_CHANGE:
if (TaskBarIconMutex != NULL)
{
if (bDismountOnSessionLocked && (WTS_SESSION_LOCK == wParam))
if (bDismountOnSessionLocked && ((WTS_SESSION_LOCK == wParam) || (WTS_CONSOLE_DISCONNECT == wParam) || (WTS_REMOTE_DISCONNECT == wParam)))
{
// Auto-dismount when session is locked
DWORD dwResult;