vcl/jsdialog/jsdialogbuilder.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 7569ee7e7009bb2a4193090040a7f1a83e1090b0 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Jun 8 14:56:46 2022 +0200 Commit: Andras Timar <[email protected]> CommitDate: Thu Jun 9 21:11:54 2022 +0200 jsdialog: be sure we send close popup message when destroyed use different m_sTypeOfJSON for popups so we can later detect popup closing Change-Id: Id0086815317011b142b49f4e1421b76e1e663358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135498 Tested-by: Andras Timar <[email protected]> Reviewed-by: Andras Timar <[email protected]> diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index ff543ca60be8..ac66f669c239 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -517,7 +517,10 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR { // when it is a popup we initialize sender in weld_popover if (bPopup) + { + m_sTypeOfJSON = "popup"; return; + } vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -666,6 +669,9 @@ JSInstanceBuilder* JSInstanceBuilder::CreatePopupBuilder(weld::Widget* pParent, JSInstanceBuilder::~JSInstanceBuilder() { + if (m_sTypeOfJSON == "popup") + sendClosePopup(m_nWindowId); + if (m_aWindowToRelease) { m_aWindowToRelease->ReleaseLOKNotifier();
