This change will make the parent TLW come to

the front again after it has been sent to
    the back for some unknown reason, after a
    message dialog has been show.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-02-28 15:14:20 +00:00
parent e9729fc70c
commit 3b439e60e0
2 changed files with 12 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES);
}
if (parent)
if (m_parent)
gtk_window_set_transient_for(GTK_WINDOW(m_widget),
GTK_WINDOW(m_parent->m_widget));
}
@@ -101,6 +101,11 @@ wxMessageDialog::~wxMessageDialog()
int wxMessageDialog::ShowModal()
{
// This should be necessary, but otherwise the
// parent TLW will disappear..
if (m_parent)
gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
gtk_widget_destroy(m_widget);
m_widget = NULL;

View File

@@ -90,7 +90,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_YES);
}
if (parent)
if (m_parent)
gtk_window_set_transient_for(GTK_WINDOW(m_widget),
GTK_WINDOW(m_parent->m_widget));
}
@@ -101,6 +101,11 @@ wxMessageDialog::~wxMessageDialog()
int wxMessageDialog::ShowModal()
{
// This should be necessary, but otherwise the
// parent TLW will disappear..
if (m_parent)
gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
gtk_widget_destroy(m_widget);
m_widget = NULL;