Kaydet (Commit) aeb54120 authored tarafından Mike Kaganski's avatar Mike Kaganski

Use correct message filters in MsgWaitForMultipleObjects

Omission from commit 648f24f5, that
made TWAIN GUI to lag.

Change-Id: If2bbc53c2abf11e724f0cd6ad470a0263cd8457d
Reviewed-on: https://gerrit.libreoffice.org/65713
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst e5bc6908
......@@ -251,8 +251,7 @@ void Twain::ShimListenerThread::execute()
HANDLE h = hShimProcess.get();
while (true)
{
DWORD nWaitResult = MsgWaitForMultipleObjects(1, &h, FALSE, INFINITE,
QS_ALLPOSTMESSAGE | QS_SENDMESSAGE);
DWORD nWaitResult = MsgWaitForMultipleObjects(1, &h, FALSE, INFINITE, QS_POSTMESSAGE);
// Process any messages in queue before checking if we need to break, to not loose
// possible pending notifications
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE))
......
......@@ -561,8 +561,8 @@ int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
MSG msg;
while (true)
{
DWORD nWaitResult = MsgWaitForMultipleObjects(1, &hParentThread, FALSE, INFINITE,
QS_ALLPOSTMESSAGE | QS_SENDMESSAGE);
DWORD nWaitResult
= MsgWaitForMultipleObjects(1, &hParentThread, FALSE, INFINITE, QS_ALLINPUT);
if (nWaitResult == WAIT_OBJECT_0)
return 5; // Parent process' thread died before we exited
if (nWaitResult == WAIT_FAILED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment