vcl/source/app/salvtables.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 8fd6924fc36b7a006e2edec60b7b59cec2ca883b Author: Caolán McNamara <[email protected]> AuthorDate: Fri Jan 7 12:17:36 2022 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jan 7 16:12:52 2022 +0100 Resolves: tdf#129745 don't override child help for application frames the glue WindowInstance is created on demand, and on creation descends into any existing open dialogs and changes their help handlers. We could not descend into child dialogs, but we shouldn't change the app frame help handler anyway. Change-Id: I8d149d324f04824fbe9eec517d8c482fd96b125b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 95451c9609ce..e19d055b8253 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1427,7 +1427,10 @@ SalInstanceWindow::SalInstanceWindow(vcl::Window* pWindow, SalInstanceBuilder* p : SalInstanceContainer(pWindow, pBuilder, bTakeOwnership) , m_xWindow(pWindow) { - override_child_help(m_xWindow); + // tdf#129745 only override child help for the normal case, not for + // m_pBuilder of null which is the toplevel application frame case. + if (m_pBuilder) + override_child_help(m_xWindow); } void SalInstanceWindow::set_title(const OUString& rTitle) { m_xWindow->SetText(rTitle); } @@ -1533,7 +1536,13 @@ weld::ScreenShotCollection SalInstanceWindow::collect_screenshot_data() return aRet; } -SalInstanceWindow::~SalInstanceWindow() { clear_child_help(m_xWindow); } +SalInstanceWindow::~SalInstanceWindow() +{ + // tdf#129745 only undo overriding child help for the normal case, not for + // m_pBuilder of null which is the toplevel application frame case. + if (m_pBuilder) + clear_child_help(m_xWindow); +} IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool) {
