X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f618020a15f1647a83aaeab1fe315f90497a9876..b5a49d4c5267d4eb933d45ec615ac2ed374750dc:/src/gtk/toplevel.cpp?ds=sidebyside diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 6484fa7f00..28ca27533d 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -191,12 +191,13 @@ gtk_frame_realized_callback( GtkWidget * WXUNUSED(widget), wxTopLevelWindowGTK * gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1); // reset the icon - wxIcon iconOld = win->GetIcon(); - if ( iconOld != wxNullIcon ) + wxIconBundle iconsOld = win->GetIcons(); + wxIcon tmp = iconsOld.GetIcon( -1 ); // operator != is not-const + if ( tmp != wxNullIcon ) { - wxIcon icon( iconOld ); + // wxIconBundle icon( iconOld ); win->SetIcon( wxNullIcon ); - win->SetIcon( icon ); + win->SetIcons( iconsOld ); } // we set the focus to the child that accepts the focus. this @@ -417,8 +418,10 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, // for m_mainWidget themes gtk_signal_connect( GTK_OBJECT(m_mainWidget), "expose_event", GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this ); +#ifndef __WXGTK20__ gtk_signal_connect( GTK_OBJECT(m_mainWidget), "draw", GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this ); +#endif #ifdef __WXDEBUG__ debug_focus_in( m_mainWidget, wxT("wxTopLevelWindowGTK::m_mainWidget"), name ); @@ -840,13 +843,13 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons ) { wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); GdkWindow* window = m_widget->window; - wxCHECK_RET( window, _T("window not created yet - can't set icon") ); wxTopLevelWindowBase::SetIcons( icons ); DoSetIcon( icons.GetIcon( -1 ) ); - wxSetIconsX11( (WXDisplay*)GDK_WINDOW_XDISPLAY( window ), - (WXWindow)GDK_WINDOW_XWINDOW( window ), icons ); + if( window ) + wxSetIconsX11( (WXDisplay*)GDK_WINDOW_XDISPLAY( window ), + (WXWindow)GDK_WINDOW_XWINDOW( window ), icons ); } // ----------------------------------------------------------------------------