https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02f3cb538119727e6a4fa9...
commit 02f3cb538119727e6a4fa9222716446a8b563767 Author: Eric Kohl eric.kohl@reactos.org AuthorDate: Mon May 21 11:20:50 2018 +0200 Commit: Eric Kohl eric.kohl@reactos.org CommitDate: Mon May 21 11:21:42 2018 +0200
[WINLOGON] Close all dialog boxes on SAS
CORE-13593 --- base/system/winlogon/sas.c | 8 ++------ base/system/winlogon/winlogon.h | 4 ++-- base/system/winlogon/wlx.c | 12 +++++------- 3 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c index 3f02df3316..077079d7e1 100644 --- a/base/system/winlogon/sas.c +++ b/base/system/winlogon/sas.c @@ -1157,9 +1157,7 @@ DispatchSAS( case STATE_LOGGED_OFF: Session->LogonState = STATE_LOGGED_OFF_SAS;
- hwnd = GetTopDialogWindow(); - if (hwnd != NULL) - SendMessage(hwnd, WLX_WM_SAS, 0, 0); + CloseAllDialogWindows();
Session->Options = 0;
@@ -1192,9 +1190,7 @@ DispatchSAS( case STATE_LOCKED: Session->LogonState = STATE_LOCKED_SAS;
- hwnd = GetTopDialogWindow(); - if (hwnd != NULL) - SendMessage(hwnd, WLX_WM_SAS, 0, 0); + CloseAllDialogWindows();
wlxAction = (DWORD)Session->Gina.Functions.WlxWkstaLockedSAS(Session->Gina.Context, dwSasType); break; diff --git a/base/system/winlogon/winlogon.h b/base/system/winlogon/winlogon.h index a27f1ed9f2..37960e2367 100644 --- a/base/system/winlogon/winlogon.h +++ b/base/system/winlogon/winlogon.h @@ -342,8 +342,8 @@ RemoveStatusMessage(IN PWLSESSION Session); VOID InitDialogListHead(VOID);
-HWND -GetTopDialogWindow(VOID); +VOID +CloseAllDialogWindows(VOID);
BOOL GinaInit(IN OUT PWLSESSION Session); diff --git a/base/system/winlogon/wlx.c b/base/system/winlogon/wlx.c index ba24de1311..44983e78e9 100644 --- a/base/system/winlogon/wlx.c +++ b/base/system/winlogon/wlx.c @@ -106,24 +106,22 @@ GetDialogListEntry(HWND hwndDlg)
HWND -GetTopDialogWindow(VOID) +CloseAllDialogWindows(VOID) { PDIALOG_LIST_ENTRY Current; PLIST_ENTRY ListEntry;
ListEntry = DialogListHead.Flink; - if (ListEntry != &DialogListHead) + while (ListEntry != &DialogListHead) { Current = CONTAINING_RECORD(ListEntry, DIALOG_LIST_ENTRY, Entry);
- TRACE("Found entry: %p window %p\n", Current, Current->hWnd); - return Current->hWnd; - } + PostMessage(Current->hWnd, WLX_WM_SAS, 0, 0);
- TRACE("Found no window\n"); - return NULL; + ListEntry = ListEntry->Flink; + } }