[Libreoffice-commits] core.git: extensions/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Dec 29 14:40:56 UTC 2018
extensions/source/scanner/scanwin.cxx | 3 +--
extensions/source/scanner/twain32shim.cxx | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit aeb54120a47768ca3dc92f5bbb715ee491646e48
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Dec 29 15:28:19 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Dec 29 15:40:32 2018 +0100
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 at collabora.com>
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)
More information about the Libreoffice-commits
mailing list