vcl/jsdialog/jsdialogbuilder.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit cea6679e11b8c18e4641f317831859c159cb8455
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jun 8 14:56:46 2022 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Jun 9 23:28:34 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/+/135497
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index eb2fab02c0fc..11edcb26d94d 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -515,7 +515,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();
 
@@ -662,6 +665,9 @@ JSInstanceBuilder::CreateFormulabarBuilder(vcl::Window* 
pParent, const OUString&
 
 JSInstanceBuilder::~JSInstanceBuilder()
 {
+    if (m_sTypeOfJSON == "popup")
+        sendClosePopup(m_nWindowId);
+
     if (m_aWindowToRelease)
     {
         m_aWindowToRelease->ReleaseLOKNotifier();

Reply via email to