X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..0cebbfc2bd3a22ee50f789fca623d9037660e495:/src/gtk/control.cpp?ds=inline diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index cc203cb561..9641245f39 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/settings.h" #endif #include "wx/fontutil.h" -#include "wx/settings.h" #include "wx/gtk/private.h" // ============================================================================ @@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxControl, wxWindow) wxControl::wxControl() { - m_needParent = TRUE; + m_needParent = true; } bool wxControl::Create( wxWindow *parent, @@ -366,4 +366,24 @@ wxControl::GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t widget_new, return attr; } +// ---------------------------------------------------------------------------- +// idle handling +// ---------------------------------------------------------------------------- + +void wxControl::OnInternalIdle() +{ + if ( GtkShowFromOnIdle() ) + return; + + if ( GTK_WIDGET_REALIZED(m_widget) ) + { + GTKUpdateCursor(); + + GTKSetDelayedFocusIfNeeded(); + } + + if ( wxUpdateUIEvent::CanUpdate(this) ) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); +} + #endif // wxUSE_CONTROLS