From e94dc6f63a05ab7744b720847c13bd0e2f674417 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 10 Jan 2019 10:44:31 +0000 Subject: Resolves: tdf#122404 unlock just the toplevels that were locked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit push what toplevels got locked to just unlock those ones. otherwise the just dismissed toplevel may still be present in the Application toplevel list. merge all the similar examples of this. Change-Id: I77c0d55d1e4b3bcc3b8d88fef00ba289edd1e831 Reviewed-on: https://gerrit.libreoffice.org/66076 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/vcl/waitobj.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/vcl/waitobj.hxx') diff --git a/include/vcl/waitobj.hxx b/include/vcl/waitobj.hxx index daf0e2a68a4f..858f49d4ae9b 100644 --- a/include/vcl/waitobj.hxx +++ b/include/vcl/waitobj.hxx @@ -23,6 +23,9 @@ #include #include +#include +#include + class VCL_DLLPUBLIC WaitObject { private: @@ -37,6 +40,18 @@ public: ~WaitObject(); }; +class VCL_DLLPUBLIC TopLevelWindowLocker +{ +private: + std::stack>> m_aBusyStack; +public: + // lock all toplevels, except the argument + void incBusy(const vcl::Window* pIgnore); + // unlock previous lock + void decBusy(); + bool isBusy() const { return !m_aBusyStack.empty(); } +}; + #endif // INCLUDED_VCL_WAITOBJ_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit