[Libreoffice-commits] core.git: desktop/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 25 17:21:00 UTC 2019
desktop/source/lib/init.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 01b1e44f03bd3f9c2e56712d8a75719c2b7b906d
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed May 8 11:20:09 2019 -0400
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 25 19:20:07 2019 +0200
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 at collabora.co.uk>
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;
}
More information about the Libreoffice-commits
mailing list