Applied patch for improving event dispatching on WIN32. bug=17881. r=rods@netscape.com,michael.lowe@bigfoot.com

This commit is contained in:
kmcclusk%netscape.com 1999-11-22 22:51:39 +00:00
Родитель 956963a788
Коммит da68112960
1 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -78,13 +78,10 @@ NS_METHOD nsAppShell::Run(void)
// Give priority to system messages (in particular keyboard, mouse,
// timer, and paint messages).
// Note: on Win98 and NT 5.0 we can also use PM_QS_INPUT and PM_QS_PAINT flags.
if (::PeekMessage(&msg, NULL, 0, WM_USER-1, PM_REMOVE)) {
keepGoing = (msg.message != WM_QUIT);
if (::PeekMessage(&msg, NULL, 0, WM_USER-1, PM_REMOVE) ||
::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
} else {
// Block and wait for any posted application message
keepGoing = ::GetMessage(&msg, NULL, 0, 0);
}
keepGoing = (msg.message != WM_QUIT);
if (keepGoing != 0) {
TranslateMessage(&msg);
@ -92,6 +89,11 @@ NS_METHOD nsAppShell::Run(void)
if (mDispatchListener)
mDispatchListener->AfterDispatch();
}
} else {
// Block and wait for any posted application message
::WaitMessage();
}
} while (keepGoing != 0);
Release();
return msg.wParam;