[Libreoffice-commits] core.git: basctl/source include/vcl vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 13 15:30:42 UTC 2020
basctl/source/basicide/baside2.cxx | 13 ++++++-------
include/vcl/dialog.hxx | 3 ---
vcl/source/window/dialog.cxx | 9 ---------
3 files changed, 6 insertions(+), 19 deletions(-)
New commits:
commit 43b068aade8c1eedbfd0fa4f4c50bfd5bdc9b823
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 13 11:58:45 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 13 16:30:05 2020 +0100
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 at redhat.com>
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 );
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 1840635f151f..775714ec8658 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -133,9 +133,6 @@ public:
void EndDialog( long nResult = RET_CANCEL );
static void EndAllDialogs( vcl::Window const * pParent );
- // returns the most recent of the currently executing modal dialogs
- static VclPtr<Dialog> GetMostRecentExecutingDialog();
-
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index fc16fa6291b9..588fbbd874fa 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1150,15 +1150,6 @@ void Dialog::EndAllDialogs( vcl::Window const * pParent )
}
}
-VclPtr<Dialog> Dialog::GetMostRecentExecutingDialog()
-{
- ImplSVData* pSVData = ImplGetSVData();
- auto& rExecuteDialogs = pSVData->mpWinData->mpExecuteDialogs;
- if (!rExecuteDialogs.empty())
- return rExecuteDialogs.back();
- return nullptr;
-}
-
void Dialog::SetModalInputMode( bool bModal )
{
if ( bModal == mbModalMode )
More information about the Libreoffice-commits
mailing list