summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorPatrick Luby <plubius@neooffice.org>2023-01-08 14:41:24 -0500
committerPatrick Luby <plubius@neooffice.org>2023-01-13 14:10:00 +0000
commitfed429e4f6f437997aa6a88e2d071f58aa00ee34 (patch)
tree0723aaf6f5e4698fbab4ce4bd368ad00e997c070 /vcl/source/app
parent1a79594a27f41ad369e7c387c51e00afb1352872 (diff)
Related: tdf#152703 Eliminate potential blocking during live resize
Some events and timers call Application::Reschedule() or Application::Yield() so don't block and wait for events when a window is in live resize. Also, only native events and timers need to be dispatched to redraw the window so skip dispatching user events when a window is in live resize. Lastly, only higher priority tasks need to be fired to redraw the window so skip firing potentially long-running tasks, such as the Writer idle layout timer, when a window is in live resize. Change-Id: I5d449caa432399e836b8e59781e5cc53af718873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145211 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/scheduler.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 1f8f3034bc58..7afdfd0846e6 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -359,6 +359,13 @@ void Scheduler::CallbackTaskScheduling()
for (; nTaskPriority < PRIO_COUNT; ++nTaskPriority)
{
+ // Related: tdf#152703 Eliminate potential blocking during live resize
+ // Only higher priority tasks need to be fired to redraw the window
+ // so skip firing potentially long-running tasks, such as the Writer
+ // idle layout timer, when a window is in live resize
+ if ( ImplGetSVData()->mpWinData->mbIsLiveResize && nTaskPriority == static_cast<int>(TaskPriority::LOWEST) )
+ continue;
+
pSchedulerData = rSchedCtx.mpFirstSchedulerData[nTaskPriority];
pPrevSchedulerData = nullptr;
while (pSchedulerData)