vcl/qa/cppunit/timer.cxx | 4 ++-- vcl/source/app/scheduler.cxx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 1c8c85e3866b1a6b35baafd3482ff7ef494a0f24 Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Fri Jul 14 17:17:15 2017 +0200 Fix instant 0ms scheduler wakeup for headless This is a regression from commit 503eba23c9a199583eddee9e169a4fddbecf416f Due to rounding errors, as the Scheduler uses milliseconds, but the headless backend uses nanoseconds the StartTimer assumed it would wake up this ms, but the headless check function would still wait. This is more of a workaround, so instant wakeup for the headless backend works again. Change-Id: I2ba9b4ad2b67ec99eeb4dd098ded6457d3753127 diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx index eface298c865..c1f14ced5c38 100644 --- a/vcl/qa/cppunit/timer.cxx +++ b/vcl/qa/cppunit/timer.cxx @@ -413,8 +413,8 @@ void TimerTest::testTriggerIdleFromIdle() TriggerIdleFromIdle aTest1( &bTriggered1, &aTest2 ); aTest1.Start(); Application::Yield(); - CPPUNIT_ASSERT_MESSAGE("idle triggered", bTriggered1); - CPPUNIT_ASSERT_MESSAGE("idle triggered", bTriggered2); + CPPUNIT_ASSERT_MESSAGE("idle not triggered", bTriggered1); + CPPUNIT_ASSERT_MESSAGE("idle not triggered", bTriggered2); } diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index a1634f73e2f3..dd2fd35b8664 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -145,7 +145,8 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce, sal_uInt64 nTime) ? SAL_MAX_UINT64 : rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod; // Only if smaller timeout, to avoid skipping. - if (bForce || nProposedTimeout < nCurTimeout) + // Force instant wakeup on 0ms, if the previous period was not 0ms + if (bForce || nProposedTimeout < nCurTimeout || (!nMS && rSchedCtx.mnTimerPeriod)) { SAL_INFO( "vcl.schedule", " Starting scheduler system timer (" << nMS << "ms)" ); rSchedCtx.mnTimerStart = nTime; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits