summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-11-24 09:33:34 +0200
committerAron Budea <aron.budea@collabora.com>2022-11-25 14:10:39 +0100
commit5e8b147574a3bd33800aa8589ec2aa264eaa97d9 (patch)
treebcf97cf834c542b75c2556a01c8d2d7154c67f9d /vcl
parentdc62b698f7a57b244dc80e0b607922505af233e9 (diff)
tdf#148435 - avoid strange OS/X deadlock around AnyInput.
Apparently calling AnyInput on Mac and filtering for just input, gives you window creation / re-sizing events which then trigger idle paint events which then deadlock if called with the scheduler lock. So just don't do this optimisation. Change-Id: I2b518fba607815241d3bd60407cdf51a4357aef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 8b442d7fae17660b3665da2c1f7a084341987693) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143162 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/scheduler.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 5da5c2465c60..927de71c4fbb 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -419,6 +419,11 @@ void Scheduler::CallbackTaskScheduling()
break;
}
+// tdf#148435 Apparently calling AnyInput on Mac and filtering for just input, gives
+// you window creation / re-sizing events which then trigger idle paint
+// events which then deadlock if called with the scheduler lock.
+// So since this is an optimisation, just don't do this on mac.
+#ifndef MACOSX
// Delay invoking tasks with idle priorities as long as there are user input or repaint events
// in the OS event queue. This will often effectively compress such events and repaint only
// once at the end, improving performance in cases such as repeated zooming with a complex document.
@@ -430,6 +435,7 @@ void Scheduler::CallbackTaskScheduling()
pMostUrgent = nullptr;
nMinPeriod = 0;
}
+#endif
if (InfiniteTimeoutMs != nMinPeriod)
SAL_INFO("vcl.schedule",