summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-06-12 17:22:41 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-06-13 08:08:37 +0000
commitf645f21eb7c1fbf4addaeff19c1c3dd9c553431c (patch)
tree3e1263dec5c2fd4ef569dc9f91ec9db63cec7c55
parent3754474cdea72ebe7f09457ef82a5c3131d06b78 (diff)
tdf#92036 - work around writer spelling issue
Issue exposed by fix for tdf#91727. Change-Id: Ia1eafbd4db28bcfa6c90e0d58735e232c7449f83 Reviewed-on: https://gerrit.libreoffice.org/16252 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/source/app/idle.cxx17
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: */