summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/scanner/scanwin.cxx3
-rw-r--r--extensions/source/scanner/twain32shim.cxx4
2 files changed, 3 insertions, 4 deletions
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index fce8f72577ba..e6d238fbcaf8 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -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))
diff --git a/extensions/source/scanner/twain32shim.cxx b/extensions/source/scanner/twain32shim.cxx
index c5a4c0b3fa6f..fd213fcd12cb 100644
--- a/extensions/source/scanner/twain32shim.cxx
+++ b/extensions/source/scanner/twain32shim.cxx
@@ -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)