Skip to content

Commit

Permalink
[DESK] Fix screensaver preview after calling its settings (#4921)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Cleverking2003 committed Dec 4, 2022
1 parent cae51e8 commit 71123b7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dll/cpl/desk/screensaver.c
Expand Up @@ -247,10 +247,6 @@ WaitForSettingsDialog(HWND hwndDlg,
DispatchMessage(&msg);
}
}
else
{
return FALSE;
}
}
else if (dwResult == WAIT_OBJECT_0)
{
Expand Down Expand Up @@ -308,6 +304,9 @@ ScreensaverConfig(HWND hwndDlg, PDATA pData)

if (WaitForSettingsDialog(hwndDlg, pi.hProcess))
SetScreenSaverPreviewBox(hwndDlg, pData);

CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
}

Expand Down

1 comment on commit 71123b7

@JoachimHenze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attention: the lower part of that fix is cool and okay. But the upper part does unhide a bug in WIN32K that we don't have a fix for yet:
https://jira.reactos.org/browse/CORE-18745

Please sign in to comment.