include/sfx2/basedlgs.hxx | 2 +- sfx2/source/dialog/basedlgs.cxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 9446b3ccd1240dbd44cbe1f1ccdfca04b61c85af Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jan 24 15:46:50 2022 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 25 10:04:38 2022 +0100 tdf#146571 Ignore focus changes after closing Manage changes dialog Change-Id: Ib588310410a265acdd129a8e51adf56bb5973bd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128869 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index e7cf250d1159..2adc649a8ec8 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -47,7 +47,7 @@ public: // when the dialog has an associated SfxChildWin, typically for Modeless interaction virtual void ChildWinDispose() {} // called from the associated SfxChildWin dtor - virtual void Close() {} // called by the SfxChildWin when the dialog is closed + virtual void Close(); // called by the SfxChildWin when the dialog is closed virtual void EndDialog(int nResponse); // called by the SfxChildWin to close the dialog }; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 7319b9981419..2fefb02ff125 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -197,6 +197,7 @@ void SfxModelessDialogController::Close() m_pBindings->GetDispatcher_Impl()->ExecuteList( m_xImpl->pMgr->GetType(), SfxCallMode::RECORD|SfxCallMode::SYNCHRON, { &aValue } ); + SfxDialogController::Close(); } SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, @@ -210,6 +211,12 @@ SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& m_xDialog->connect_container_focus_changed(LINK(this, SfxDialogController, FocusChangeHdl)); } +void SfxDialogController::Close() +{ + // tdf3146571 ignore focus changes after we've closed + m_xDialog->connect_container_focus_changed(Link<weld::Container&, void>()); +} + IMPL_STATIC_LINK_NOARG(SfxDialogController, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) { return SfxViewShell::Current();