mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
[DESK]
- Rearrange screensaver wait codes around the MsgWaitForMultipleObjects function - Fixes screensaver configuration windows blocking the control panel - Refs: http://blogs.msdn.com/b/oldnewthing/archive/2005/02/17/375307.aspx and http://codereflect.com/2008/09/19/when-and-how-should-we-use-msgwaitformultipleobjects/ See issue #4213 for more details. svn path=/trunk/; revision=47548
This commit is contained in:
parent
42667f14a0
commit
10dc21e801
1 changed files with 20 additions and 21 deletions
|
@ -147,33 +147,32 @@ static BOOL
|
|||
WaitForSettingsDialog(HWND hwndDlg,
|
||||
HANDLE hProcess)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
DWORD Ret;
|
||||
DWORD dwResult;
|
||||
MSG msg;
|
||||
|
||||
while (PeekMessage(&msg,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
PM_REMOVE))
|
||||
while (TRUE)
|
||||
{
|
||||
dwResult = MsgWaitForMultipleObjects(1,
|
||||
&hProcess,
|
||||
FALSE,
|
||||
INFINITE,
|
||||
QS_ALLINPUT);
|
||||
if (dwResult == WAIT_OBJECT_0 + 1)
|
||||
{
|
||||
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (msg.message == WM_QUIT)
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
if (IsDialogMessage(hwndDlg, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
Ret = MsgWaitForMultipleObjects(1,
|
||||
&hProcess,
|
||||
FALSE,
|
||||
INFINITE,
|
||||
QS_ALLINPUT);
|
||||
if (Ret == (WAIT_OBJECT_0))
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue