summaryrefslogtreecommitdiff
path: root/include/vcl/waitobj.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-10 10:44:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-01-11 11:57:24 +0100
commite94dc6f63a05ab7744b720847c13bd0e2f674417 (patch)
treeaaca480a3a2665a0e6eaa067cc61c5ce97225f34 /include/vcl/waitobj.hxx
parentd095a887a9b0cce81b4f828feed759b5d0b3ad3f (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/66076 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/waitobj.hxx')
-rw-r--r--include/vcl/waitobj.hxx15
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: */