summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-09-09 18:54:17 -0400
committerHenry Castro <hcastro@collabora.com>2020-09-14 15:23:01 +0200
commit855ce740ee1ce4cfdafdc34266ce9668cccc2874 (patch)
treea6a439ade35365e6454ced41e35c61e054f80a5c
parentdbca79d09acf5439e59c693db941b1d6e73c94c9 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx8
1 files changed, 7 insertions, 1 deletions
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();
+ }
}
}