summaryrefslogtreecommitdiff
path: root/desktop/inc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2022-01-18 17:04:15 +0000
committerMichael Meeks <michael.meeks@collabora.com>2022-01-20 12:06:32 +0100
commit02634fb7c7e8dc613ffc3717bb244f85cf81a7c6 (patch)
tree3d01bda9c41d3ded9b7744202b99d8183b823e34 /desktop/inc
parent1284937bf2bd112197a99e844a5a1a961e2cf4fc (diff)
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 <michael.meeks@collabora.com>
Diffstat (limited to 'desktop/inc')
-rw-r--r--desktop/inc/lib/init.hxx2
1 files changed, 2 insertions, 0 deletions
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<int, std::string> m_states;
+ std::unordered_map<std::string, std::string> m_lastStateChange;
std::unordered_map<int, std::unordered_map<int, std::string>> m_viewStates;
// For some types only the last message matters (see isUpdatedType()) or only the last message