diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-22 21:37:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-23 11:57:19 +0200 |
commit | 0324ad6d99650eccb01729f18f95c2f7f4b3ce68 (patch) | |
tree | d8bcb8f689c49728b92ca3de2ce8c8d1acc453c6 | |
parent | fef4dc459fd242549d791a47fc1fb5fc28b9193b (diff) |
async modal dialogs need to inc/dec parent frame modality
like sync ones do, so vcl knows those frames are modal-locked,
so e.g. a blank calc document with a modal async dialog open,
e.g. page dialog, is not considered a candidate for reuse
if soffice is instructed, e.g. via command line pipe, to
open another calc document
Change-Id: Id24c2ca5277e5a0e379a3e4f718514ca5e9feb03
Reviewed-on: https://gerrit.libreoffice.org/76145
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 0094a2cd1627..af20ca70ca06 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3180,6 +3180,8 @@ public: m_xDialogController = rDialogController; m_aFunc = func; + if (get_modal()) + m_aDialogRun.inc_modal_count(); show(); m_nResponseSignalId = g_signal_connect(m_pDialog, "response", G_CALLBACK(signalAsyncResponse), this); @@ -3198,6 +3200,8 @@ public: m_xRunAsyncSelf = rxSelf; m_aFunc = func; + if (get_modal()) + m_aDialogRun.inc_modal_count(); show(); m_nResponseSignalId = g_signal_connect(m_pDialog, "response", G_CALLBACK(signalAsyncResponse), this); @@ -4847,6 +4851,8 @@ void GtkInstanceDialog::asyncresponse(gint ret) return; } + if (get_modal()) + m_aDialogRun.dec_modal_count(); hide(); m_aFunc(GtkToVcl(ret)); m_aFunc = nullptr; |