[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 25 16:43:49 UTC 2019
vcl/unx/gtk3/gtk3gtkinst.cxx | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
New commits:
commit e0f63fdebc6181bea39dad163566da5afe61b88a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Nov 1 11:39:13 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 25 17:43:03 2019 +0100
the label sync button will relaunch itself from its close handler
so rearrange things so that runAsync can survive that
Reviewed-on: https://gerrit.libreoffice.org/81884
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 60692ba238c6c5c003722ccaa52702e9ef3ade13)
Change-Id: I7d40637fb861ceb64ce32f0e9ecb3451c0d17bad
Reviewed-on: https://gerrit.libreoffice.org/83523
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 194d669cdedf..090275da6e97 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3242,7 +3242,7 @@ public:
if (gtk_widget_get_visible(m_pWidget))
return;
sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(m_pDialog)));
- gtk_widget_show(m_pWidget);
+ GtkInstanceWindow::show();
}
virtual void set_modal(bool bModal) override
@@ -4854,24 +4854,26 @@ void GtkInstanceDialog::asyncresponse(gint ret)
}
hide();
- m_aFunc(GtkToVcl(ret));
-
- if (m_nResponseSignalId)
- {
- g_signal_handler_disconnect(m_pDialog, m_nResponseSignalId);
- m_nResponseSignalId = 0;
- }
- if (m_nSignalDeleteId)
- {
- g_signal_handler_disconnect(m_pDialog, m_nSignalDeleteId);
- m_nSignalDeleteId = 0;
- }
- m_aFunc = nullptr;
// move the self pointer, otherwise it might be de-allocated by time we try to reset it
- std::shared_ptr<weld::Dialog> me = std::move(m_xRunAsyncSelf);
- m_xDialogController.reset();
- me.reset();
+ auto xRunAsyncSelf = std::move(m_xRunAsyncSelf);
+ auto xDialogController = std::move(m_xDialogController);
+ auto aFunc = std::move(m_aFunc);
+
+ auto nResponseSignalId = m_nResponseSignalId;
+ auto nSignalDeleteId = m_nSignalDeleteId;
+ m_nResponseSignalId = 0;
+ m_nSignalDeleteId = 0;
+
+ aFunc(GtkToVcl(ret));
+
+ if (nResponseSignalId)
+ g_signal_handler_disconnect(m_pDialog, nResponseSignalId);
+ if (nSignalDeleteId)
+ g_signal_handler_disconnect(m_pDialog, nSignalDeleteId);
+
+ xDialogController.reset();
+ xRunAsyncSelf.reset();
}
int GtkInstanceDialog::run()
More information about the Libreoffice-commits
mailing list