summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-29 15:28:19 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-29 15:40:32 +0100
commitaeb54120a47768ca3dc92f5bbb715ee491646e48 (patch)
tree5e94dbdf82f920f38a655e11289efc3fb63b05f5 /extensions
parente5bc69087a6e67f0872317c130dfac4fe242c448 (diff)
Use correct message filters in MsgWaitForMultipleObjects
Omission from commit 648f24f5d1dae3f0fd5b132d68a5e39066f2572d, that made TWAIN GUI to lag. Change-Id: If2bbc53c2abf11e724f0cd6ad470a0263cd8457d Reviewed-on: https://gerrit.libreoffice.org/65713 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions')
-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)