diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/idle.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx index e2fa915bc66d..18ab52a06588 100644 --- a/vcl/source/app/idle.cxx +++ b/vcl/source/app/idle.cxx @@ -57,9 +57,22 @@ bool Idle::ReadyForSchedule( bool bTimer ) return true; // !bTimer } -sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 /* nMinPeriod */, sal_uInt64 /* nTime */ ) +sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 /* nTime */ ) { - return 1; + switch (mePriority) { + case SchedulerPriority::HIGHEST: + case SchedulerPriority::HIGH: + case SchedulerPriority::RESIZE: + case SchedulerPriority::REPAINT: + nMinPeriod = 1; // don't wait. + break; + default: + // FIXME: tdf#92036 workaround, I should be 1 too - wait 5ms + if (nMinPeriod > 5) + nMinPeriod = 5; + break; + } + return nMinPeriod; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |