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 14:09:25 +0100
commit71fad56863301f47f19fdd47ab93099ad098474e (patch)
tree6b55287b924215cec427b43046b15547c24b2e0d /include
parentd8d148c96d7cdd96948240ac30b3aeacfb5aa7ca (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')
-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 cda688c57b1e..bdfaaf867143 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: */