summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-05-08 11:20:09 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-25 19:20:07 +0200
commit01b1e44f03bd3f9c2e56712d8a75719c2b7b906d (patch)
tree34038586016a7f7a5de16405d3ef5b3c00f01256 /desktop
parentb94214350e6e3d0252c09f203a3ce7807a179f90 (diff)
LOK: Remove window invalidations prior to size_changed
A window size change is a full invalidation anyway, so remove any prior invalidations as they are redundant. Change-Id: I439a1bc38989df17b671e064beb26eb88c402be3 (cherry picked from commit 1a5af070d876b1ec4b69fe3be732426dba59b9af) Reviewed-on: https://gerrit.libreoffice.org/76319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9667f5eac821..56d685bc5d4b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1407,6 +1407,24 @@ void CallbackFlushHandler::queue(const int type, const char* data)
return false;
});
}
+ else if (aTree.get<std::string>("action", "") == "size_changed")
+ {
+ // A size change is practically re-creation of the window.
+ // But at a minimum it's a full invalidation.
+ 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))
+ {
+ const std::string aOldAction = aOldTree.get<std::string>("action", "");
+ if (aOldAction == "invalidate")
+ return true;
+ }
+ }
+ return false;
+ });
+ }
}
break;
}