use the top level window parent as argument to gtk_window_set_transient_for() to fix GTK errors/crashes (closes #10929)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,8 +108,14 @@ bool wxFontDialog::DoCreate(wxWindow *parent)
|
|||||||
m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );
|
m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) );
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
gtk_window_set_transient_for(GTK_WINDOW(m_widget),
|
{
|
||||||
GTK_WINDOW(parent->m_widget));
|
GtkWidget *gtktlw = gtk_widget_get_toplevel(parent->m_widget);
|
||||||
|
if ( gtktlw )
|
||||||
|
{
|
||||||
|
gtk_window_set_transient_for(GTK_WINDOW(m_widget),
|
||||||
|
GTK_WINDOW(gtktlw));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget);
|
GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user