vcl/source/control/InterimItemWindow.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 04eb7f5a47b77511dd7a6e797b66ef2cfffce235
Author:     Patrick Luby <plub...@libreoffice.org>
AuthorDate: Sun Dec 24 16:43:54 2023 -0500
Commit:     Patrick Luby <plub...@libreoffice.org>
CommitDate: Sun Dec 24 23:46:54 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>

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)

Reply via email to