vcl/source/control/InterimItemWindow.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 66a5468e6c2fc15aa104da8f96313e1237641273 Author: Patrick Luby <plub...@libreoffice.org> AuthorDate: Sun Dec 24 16:43:54 2023 -0500 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Dec 25 00:42:33 2023 +0100 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 <plub...@libreoffice.org> (cherry picked from commit c6a7432b6240f2de7af3b8321c427a4da8b5cab3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161226 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> 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)