vcl/unx/gtk3/fpicker/SalGtkPicker.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
New commits: commit ba123c6b03545f9c111c997d21b7dddf50399bf2 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 12 11:21:12 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 12 15:39:17 2021 +0100 [Inc/Dec]ModalCount on parent frame so it knows it is in modal mode which is something we do on welded dialog already, but the prior native file dialog integration lacked this to date Change-Id: Ia1c3b81d5a2d567731215f367fcf37b750c51ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112383 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx index f1bcbfc4d265..7502d5af290b 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx @@ -187,7 +187,25 @@ gint RunDialog::run() mxToolkit->addTopWindowListener(this); mxDesktop->addTerminateListener(this); + + // [Inc/Dec]ModalCount on parent frame so it knows it is in modal mode + GtkWindow* pParent = gtk_window_get_transient_for(GTK_WINDOW(mpDialog)); + GtkSalFrame* pFrame = pParent ? GtkSalFrame::getFromWindow(GTK_WIDGET(pParent)) : nullptr; + VclPtr<vcl::Window> xFrameWindow = pFrame ? pFrame->GetWindow() : nullptr; + if (xFrameWindow) + { + xFrameWindow->IncModalCount(); + xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true); + } + gint nStatus = gtk_dialog_run(GTK_DIALOG(mpDialog)); + + if (xFrameWindow) + { + xFrameWindow->DecModalCount(); + xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false); + } + mxDesktop->removeTerminateListener(this); if (mxToolkit.is()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits