X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef5c70f96f5e06e1c8f8119f51b99dd019583d2b..b45ab2904c3af8c8e96943bbd1b7643f9d5fbde1:/src/gtk/control.cpp diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index 21e35fd0d2..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,8 +374,13 @@ void wxControl::OnInternalIdle() { if ( GtkShowFromOnIdle() ) return; - - GTKUpdateCursor(); + + if ( GTK_WIDGET_REALIZED(m_widget) ) + { + GTKUpdateCursor(); + + GTKSetDelayedFocusIfNeeded(); + } if ( wxUpdateUIEvent::CanUpdate(this) ) UpdateWindowUI(wxUPDATE_UI_FROMIDLE);