diff --git "a/dll/cpl/desk/screensaver.c" "b/dll/cpl/desk/screensaver.c" index a0515eab698..56da1e87fb4 100644 --- "a/dll/cpl/desk/screensaver.c" +++ "b/dll/cpl/desk/screensaver.c" @@ -223,7 +223,7 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData) } } -static BOOL +static VOID WaitForSettingsDialog(HWND hwndDlg, HANDLE hProcess) { @@ -243,22 +243,18 @@ WaitForSettingsDialog(HWND hwndDlg, { if (msg.message == WM_QUIT) { - return FALSE; + return; } - if (IsDialogMessage(hwndDlg, &msg)) + if (!IsDialogMessage(hwndDlg, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } } - else if (dwResult == WAIT_OBJECT_0) - { - return TRUE; - } else { - return FALSE; + return; } } } @@ -308,8 +304,8 @@ ScreenSaverConfig(HWND hwndDlg, PDATA pData) pData->PrevWindowPi.hThread = pData->PrevWindowPi.hProcess = NULL; } - if (WaitForSettingsDialog(hwndDlg, pi.hProcess)) - SetScreenSaverPreviewBox(hwndDlg, pData); + WaitForSettingsDialog(hwndDlg, pi.hProcess); + SetScreenSaverPreviewBox(hwndDlg, pData); CloseHandle(pi.hProcess); CloseHandle(pi.hThread);