diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-24 15:46:50 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-01-25 10:04:38 +0100 |
commit | 9446b3ccd1240dbd44cbe1f1ccdfca04b61c85af (patch) | |
tree | 5b783450f85d6387bc6d6d6badf02cb4e136e456 | |
parent | 5a1c19624eda0c8b847af0dcee70b82502578ceb (diff) |
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 <caolanm@redhat.com>
-rw-r--r-- | include/sfx2/basedlgs.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 7 |
2 files changed, 8 insertions, 1 deletions
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(); |