From 855ce740ee1ce4cfdafdc34266ce9668cccc2874 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Wed, 9 Sep 2020 18:54:17 -0400 Subject: sidebar: restrict sending once a "created" message "SidebarDockingWindow::NotifyResize" is called when the sidebar resize so the idle task should send unique "created" message per view, another case it will create undesired effect Change-Id: I8a2da2e797032a1052fb0d33a5a03486425eae46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102347 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro --- sfx2/source/sidebar/SidebarDockingWindow.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 302605d6a65a..6818c201631d 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -107,6 +107,9 @@ public: SAL_WARN("sfx.sidebar", rError.message()); } } + + bool GetLastLOKWindow() { return m_LastLOKWindowId; } + }; SidebarDockingWindow::SidebarDockingWindow(SfxBindings* pSfxBindings, SidebarChildWindow& rChildWindow, @@ -205,7 +208,10 @@ void SidebarDockingWindow::NotifyResize() SetLOKNotifier(pCurrentView); } - mpIdleNotify->Start(); + if (mpIdleNotify->GetLastLOKWindow() == 0) + { + mpIdleNotify->Start(); + } } } -- cgit