diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-06 17:04:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-09 09:59:03 +0200 |
commit | 7420a6175358fdc1cda133c0ed2eab693cc72e54 (patch) | |
tree | 0471c318368b31a5b234b187055d4646bfd4359d /fpicker | |
parent | 386b9a1bebb56367977ebc276d85f5f10d252be6 (diff) |
tdf#124579: ensure to provide an event to wake up main loop when notifying
Without that, Request::waitProcessMessages might wait indefinitely for
Application::Yield() to return; while the latter would wait for a message
in GetMessage. If there's no visible LO window, the message might never
arrive by itself.
Co-authored-by: Jan-Marek Glogowski <glogow@fbihome.de>
Change-Id: Ie2622053a8d4467eb1cbd579d8496cb5ddef08aa
Reviewed-on: https://gerrit.libreoffice.org/70346
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e3d737119fc7bdce224a173896486f376f95a417)
Reviewed-on: https://gerrit.libreoffice.org/70349
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/win32/asyncrequests.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fpicker/source/win32/asyncrequests.cxx b/fpicker/source/win32/asyncrequests.cxx index 5a5b1decf180..fcd7eadc3010 100644 --- a/fpicker/source/win32/asyncrequests.cxx +++ b/fpicker/source/win32/asyncrequests.cxx @@ -19,6 +19,7 @@ #include "asyncrequests.hxx" #include <vcl/svapp.hxx> +#include <vcl/winscheduler.hxx> #include <osl/mutex.hxx> namespace fpicker{ @@ -56,6 +57,10 @@ void Request::waitProcessMessages() void Request::notify() { m_aJoiner.set(); + // Make sure that main loop receives at least this message to return from GetMessage and recheck + // the condition, even in case when there's no visible application windows present, and thus no + // other messages might arrive to the main loop. + WinScheduler::PostDummyMessage(); } AsyncRequests::AsyncRequests(const RequestHandlerRef& rHandler) |