[DESK] Fix 3dtext screensaver restart after opening settings (#7213)

This commit is contained in:
Doug Lyons 2024-08-18 20:09:47 -05:00 committed by GitHub
parent e639d7c1e7
commit 24517d5258
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);