summaryrefslogtreecommitdiff
path: root/vcl/source/app/winscheduler.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-06 17:04:06 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-06 19:56:11 +0200
commite3d737119fc7bdce224a173896486f376f95a417 (patch)
tree14a21fe4462658da4e6e59c26626adb6576b1714 /vcl/source/app/winscheduler.cxx
parent5c32ba63163d9556ff89782a8074924cdf9dc554 (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>
Diffstat (limited to 'vcl/source/app/winscheduler.cxx')
-rw-r--r--vcl/source/app/winscheduler.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/source/app/winscheduler.cxx b/vcl/source/app/winscheduler.cxx
index f8a90f3f638d..8ec11211cfe0 100644
--- a/vcl/source/app/winscheduler.cxx
+++ b/vcl/source/app/winscheduler.cxx
@@ -25,12 +25,18 @@
#include <win/saldata.hxx>
#include <win/salinst.h>
-void WinScheduler::SetForceRealTimer()
+namespace
{
- BOOL const ret
- = PostMessageW(GetSalData()->mpInstance->mhComWnd, SAL_MSG_FORCE_REAL_TIMER, 0, 0);
+void PostMessageToComWnd(UINT nMsg)
+{
+ BOOL const ret = PostMessageW(GetSalData()->mpInstance->mhComWnd, nMsg, 0, 0);
SAL_WARN_IF(0 == ret, "vcl.schedule", "ERROR: PostMessage() failed!");
}
+}
+
+void WinScheduler::SetForceRealTimer() { PostMessageToComWnd(SAL_MSG_FORCE_REAL_TIMER); }
+
+void WinScheduler::PostDummyMessage() { PostMessageToComWnd(SAL_MSG_DUMMY); }
#endif // _WIN32