X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3bce7509838b4402927bca57a764954c868eb388..c127177f8dc31dbe99764852b8dbcc047d3ad826:/src/gtk/checkbox.cpp diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index d4023c5a04..1811807ab0 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -17,6 +17,13 @@ #include "gdk/gdk.h" #include "gtk/gtk.h" +//----------------------------------------------------------------------------- +// idle system +//----------------------------------------------------------------------------- + +extern void wxapp_install_idle_handler(); +extern bool g_isIdle; + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -29,6 +36,8 @@ extern bool g_blockEventsOnDrag; static void gtk_checkbox_clicked_callback( GtkWidget *WXUNUSED(widget), wxCheckBox *cb ) { + if (g_isIdle) wxapp_install_idle_handler(); + if (!cb->HasVMT()) return; if (cb->m_blockFirstEvent) @@ -121,9 +130,6 @@ bool wxCheckBox::Create(wxWindow *parent, PostCreation(); - gtk_widget_realize( m_widgetLabel ); - gtk_widget_realize( m_widgetCheckbox ); - SetBackgroundColour( parent->GetBackgroundColour() ); SetForegroundColour( parent->GetForegroundColour() ); SetFont( parent->GetFont() );