summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/sfx2/sfxhelp.hxx2
-rw-r--r--include/vcl/waitobj.hxx15
2 files changed, 15 insertions, 2 deletions
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index eaee5346b30e..d7afeb2b9af0 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -40,8 +40,6 @@ private:
SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* pWidget) override;
SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(const OUString &rHelpId);
SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName );
- SAL_DLLPRIVATE static void incBusy(const vcl::Window* pParent);
- SAL_DLLPRIVATE static void decBusy(const vcl::Window* pParent);
public:
SfxHelp();
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: */