https://git.reactos.org/?p=reactos.git;a=commitdiff;h=71123b72fa6ecb06ce225…
commit 71123b72fa6ecb06ce22520747e562369e96dfec
Author: Egor Ananyin <ananinegor(a)gmail.com>
AuthorDate: Sun Dec 4 18:04:23 2022 +0300
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Dec 4 18:04:23 2022 +0300
[DESK] Fix screensaver preview after calling its settings (#4921)
Fix a bug when after closing the settings window for a screensaver,
the preview for it wouldn't restart.
- Keep waiting for messages from the settings window while it's open
- Fix leaking two handles to avoid creating zombie processes
CORE-18680
---
dll/cpl/desk/screensaver.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c
index 6041c533b60..5c310f8d692 100644
--- a/dll/cpl/desk/screensaver.c
+++ b/dll/cpl/desk/screensaver.c
@@ -247,10 +247,6 @@ WaitForSettingsDialog(HWND hwndDlg,
DispatchMessage(&msg);
}
}
- else
- {
- return FALSE;
- }
}
else if (dwResult == WAIT_OBJECT_0)
{
@@ -308,6 +304,9 @@ ScreensaverConfig(HWND hwndDlg, PDATA pData)
if (WaitForSettingsDialog(hwndDlg, pi.hProcess))
SetScreenSaverPreviewBox(hwndDlg, pData);
+
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
}
}