From: Václav Slavík Date: Fri, 4 Jun 2004 11:40:06 +0000 (+0000) Subject: set transiency relation so that the WM can do better job of positioning the window X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/633c71efce4e8a3c0f848282d09ac14d78f6a1cd set transiency relation so that the WM can do better job of positioning the window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 97ce07c616..250c879881 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() diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index 97ce07c616..250c879881 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/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()