From 02634fb7c7e8dc613ffc3717bb244f85cf81a7c6 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 18 Jan 2022 17:04:15 +0000 Subject: lok: avoid duplicate emission of statechanged: messages. We tend to get many of these per keystroke, with the same state. Change-Id: I9d759f54aee8d6dabcef094997e8f352dd608ec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128539 Tested-by: Jenkins Reviewed-by: Michael Meeks --- desktop/inc/lib/init.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'desktop/inc') diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index 636cf8ef9863..288fa8ebfcc0 100644 --- a/desktop/inc/lib/init.hxx +++ b/desktop/inc/lib/init.hxx @@ -87,6 +87,7 @@ namespace desktop { static tools::Rectangle SanitizedRectangle(const tools::Rectangle& rect); }; + /// One instance of this per view, handles flushing callbacks class DESKTOP_DLLPUBLIC CallbackFlushHandler final : public Idle, public SfxLokCallbackInterface { public: @@ -191,6 +192,7 @@ namespace desktop { queue_type1 m_queue1; queue_type2 m_queue2; std::map m_states; + std::unordered_map m_lastStateChange; std::unordered_map> m_viewStates; // For some types only the last message matters (see isUpdatedType()) or only the last message -- cgit