X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06a7419e7163348a8a3a4e376db5634a691c2e48..0d045709bcd64c28a155a2a9fb29d95f56a0ff7b:/src/gtk/control.cpp diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 0fe56326ee..f940e07bdb 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -82,7 +82,7 @@ void wxControl::PostCreation(const wxSize& size) gtk_widget_ensure_style(m_widget); ApplyWidgetStyle(); - SetInitialBestSize(size); + SetInitialSize(size); } // ---------------------------------------------------------------------------- @@ -374,10 +374,13 @@ void wxControl::OnInternalIdle() { if ( GtkShowFromOnIdle() ) return; - - GTKUpdateCursor(); - GTKSetDelayedFocusIfNeeded(); + if ( GTK_WIDGET_REALIZED(m_widget) ) + { + GTKUpdateCursor(); + + GTKSetDelayedFocusIfNeeded(); + } if ( wxUpdateUIEvent::CanUpdate(this) ) UpdateWindowUI(wxUPDATE_UI_FROMIDLE);