summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-05-05 20:26:42 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-25 15:08:56 +0200
commit6661ebe5d3c2ce12a99a6af4c8de51b61b279e57 (patch)
treef438e49919f83f61c81956738911f32be2b4328a /desktop
parent08eb6de1a274fce5d04c5fadcb4d87320414873c (diff)
LOK: Window creation supersedes any events on same window
This happens when we get multiple created events on same window, interspersed with invalidations. Change-Id: I2dbaa0f84306d770f1de047a23996209c28304fe Reviewed-on: https://gerrit.libreoffice.org/76312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 201b5d9c7dfe..9667f5eac821 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1394,6 +1394,19 @@ void CallbackFlushHandler::queue(const int type, const char* data)
assert(aCallbackData.validate() && "Validation after setJson failed!");
}
}
+ else if (aTree.get<std::string>("action", "") == "created")
+ {
+ // Remove all previous actions on same dialog, if we are creating it anew.
+ removeAll([&nLOKWindowId](const queue_type::value_type& elem) {
+ if (elem.Type == LOK_CALLBACK_WINDOW)
+ {
+ const boost::property_tree::ptree& aOldTree = elem.getJson();
+ if (nLOKWindowId == aOldTree.get<unsigned>("id", 0))
+ return true;
+ }
+ return false;
+ });
+ }
}
break;
}