diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-10 10:44:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-11 14:09:25 +0100 |
commit | 71fad56863301f47f19fdd47ab93099ad098474e (patch) | |
tree | 6b55287b924215cec427b43046b15547c24b2e0d /include/vcl | |
parent | d8d148c96d7cdd96948240ac30b3aeacfb5aa7ca (diff) |
Resolves: tdf#122404 unlock just the toplevels that were locked
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/66080
Tested-by: Jenkins
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/waitobj.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
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 <vcl/dllapi.h> #include <vcl/window.hxx> +#include <stack> +#include <vector> + class VCL_DLLPUBLIC WaitObject { private: @@ -37,6 +40,18 @@ public: ~WaitObject(); }; +class VCL_DLLPUBLIC TopLevelWindowLocker +{ +private: + std::stack<std::vector<VclPtr<vcl::Window>>> 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: */ |