From 3bf6c97029d26ddf20007c47ca6b68e5cc52d846 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 12 Oct 2017 10:20:17 +0200 Subject: tdf#112975 WIN correctly handle VclInputFlags::OTHER On Windows we can just check the message queue for existing messages. But VclInputFlags::OTHER is used to check for any messages, which can't be explicitly checked. In the case of checking for VclInputFlags::OTHER while excluding an other message type, we have to make multiple PeekMessage calls and exclude all non-checked message ids. Change-Id: I1cedd4b76444769842c74228fc547f0d924f8b60 Reviewed-on: https://gerrit.libreoffice.org/43337 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- vcl/inc/win/saltimer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vcl/inc/win/saltimer.h') diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h index 37976bbfaf8b..68973e1cadc3 100644 --- a/vcl/inc/win/saltimer.h +++ b/vcl/inc/win/saltimer.h @@ -47,6 +47,7 @@ public: virtual void Stop() override; inline bool IsDirectTimeout() const; + inline bool HasTimerElapsed() const; }; inline bool WinSalTimer::IsDirectTimeout() const @@ -54,6 +55,11 @@ inline bool WinSalTimer::IsDirectTimeout() const return m_bDirectTimeout; } +inline bool WinSalTimer::HasTimerElapsed() const +{ + return m_bDirectTimeout || ExistsValidEvent(); +} + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit