From c23f735eb7579477b5de3850eac075a21329c06b Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 28 Jul 2017 19:55:03 +0200 Subject: GEN fix timeout result handling The GEN VCL backend simply ignored the result of the timeout. Change-Id: I0c1b34927ba97886cf11b2c2a203c3e82d851dc9 --- vcl/unx/generic/app/saldata.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx index 62fdd827ddd1..fb5131473e5a 100644 --- a/vcl/unx/generic/app/saldata.cxx +++ b/vcl/unx/generic/app/saldata.cxx @@ -656,8 +656,9 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) { // check for timeouts here if you want to make screenshots static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT"); + bool bHandledEvent = false; if (p_prioritize_timer != nullptr) - CheckTimeout(); + bHandledEvent = CheckTimeout(); const int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1; @@ -688,7 +689,6 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) timeval Timeout = noyield_; timeval *pTimeout = &Timeout; - bool bHandledEvent = false; if (bWait) { @@ -725,7 +725,7 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) // usually handle timeouts here (as in 5.2) if (p_prioritize_timer == nullptr) - CheckTimeout(); + bHandledEvent = CheckTimeout() || bHandledEvent; // handle wakeup events. if ((nFound > 0) && FD_ISSET(m_pTimeoutFDS[0], &ReadFDS)) -- cgit v1.2.3