]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/control.cpp
avoiding nesting dcs on the same window concurrently
[wxWidgets.git] / src / gtk / control.cpp
index cc203cb5613a29e85eb29d10ba4ce7594aae9705..9641245f398431d6079e6773f10aad799b50936d 100644 (file)
 
 #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