diff options
author | Patrick Luby <plubius@libreoffice.org> | 2023-12-24 16:43:54 -0500 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-12-25 00:42:22 +0100 |
commit | 656a18c236d9d60d31fe74a05710f3fff5e05c99 (patch) | |
tree | e1ce670b39491f91b040d1231f8325a50d28333e /vcl | |
parent | df08a291c4aea3e777f786c65048b03b4a13dbdb (diff) |
Eliminate warning when changing timer's priority
Task::SetPriority() expects the timer to be stopped while
changing the timer's priority.
Change-Id: Ib025cc1451bf6fa959284d202d29dbb1489beb0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161272
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@libreoffice.org>
(cherry picked from commit c6a7432b6240f2de7af3b8321c427a4da8b5cab3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161227
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/InterimItemWindow.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/control/InterimItemWindow.cxx b/vcl/source/control/InterimItemWindow.cxx index 697f78759933..0769245eb477 100644 --- a/vcl/source/control/InterimItemWindow.cxx +++ b/vcl/source/control/InterimItemWindow.cxx @@ -189,7 +189,15 @@ void InterimItemWindow::Draw(OutputDevice* pDevice, const Point& rPos, void InterimItemWindow::SetPriority(TaskPriority nPriority) { + // Eliminate warning when changing timer's priority + // Task::SetPriority() expects the timer to be stopped while + // changing the timer's priority. + bool bActive = m_aLayoutIdle.IsActive(); + if (bActive) + m_aLayoutIdle.Stop(); m_aLayoutIdle.SetPriority(nPriority); + if (bActive) + m_aLayoutIdle.Start(); } void InterimItemWindow::ImplPaintToDevice(::OutputDevice* pTargetOutDev, const Point& rPos) |