X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2ce5e1b2792f53e2e4a1e5f5678ab31c83559c7..d109c5849ed117966311a44875c97ae3d77b44e5:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 97ce07c616..eaa3d7cf3a 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -89,6 +89,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, else gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES); } + + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(m_widget), + GTK_WINDOW(m_parent->m_widget)); } int wxMessageDialog::ShowModal() @@ -104,6 +108,8 @@ int wxMessageDialog::ShowModal() // fall through case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_DELETE_EVENT: + case GTK_RESPONSE_CLOSE: return wxID_CANCEL; case GTK_RESPONSE_OK: return wxID_OK;