summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-13 11:58:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-13 16:30:05 +0100
commit43b068aade8c1eedbfd0fa4f4c50bfd5bdc9b823 (patch)
treee0da20f37617302d98fd52ae5e7abb21fed49eb8 /basctl
parente76bb4eab607148381e70310ef9e22cc6213555a (diff)
use TopLevelWindowLocker for the lock other windows problem
Change-Id: Ic5d279ff9271ca24d9d32728d63322e8acc2037d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88599 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 85db57dfbfdd..476ade8dc40a 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -53,7 +53,7 @@
#include <svl/visitem.hxx>
#include <svl/whiter.hxx>
#include <svx/svxids.hrc>
-#include <vcl/dialog.hxx>
+#include <vcl/waitobj.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/print.hxx>
@@ -631,13 +631,12 @@ void ModulWindow::BasicErrorHdl( StarBASIC const * pBasic )
// tdf#118572 make a currently running dialog, regardless of what its modal
// to, insensitive to user input until after this error dialog goes away.
- auto xDialog = Dialog::GetMostRecentExecutingDialog();
- const bool bToggleEnableInput = xDialog && xDialog->IsInputEnabled();
- if (bToggleEnableInput)
- xDialog->EnableInput(false);
+ TopLevelWindowLocker aBusy;
+ aBusy.incBusy(nullptr);
+
ErrorHandler::HandleError(StarBASIC::GetErrorCode(), GetFrameWeld());
- if (bToggleEnableInput)
- xDialog->EnableInput(true);
+
+ aBusy.decBusy();
// #i47002#
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );