X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e691f46b2ec1b5dbbff2e51131e3c532e688a89..e715f4e791fca58d82b01a973807aa0cd866c99f:/src/gtk1/checkbox.cpp diff --git a/src/gtk1/checkbox.cpp b/src/gtk1/checkbox.cpp index 225f9df18e..5e0dcb88f2 100644 --- a/src/gtk1/checkbox.cpp +++ b/src/gtk1/checkbox.cpp @@ -31,8 +31,9 @@ extern bool g_isIdle; // data //----------------------------------------------------------------------------- -extern bool g_blockEventsOnDrag; -extern wxCursor g_globalCursor; +extern bool g_blockEventsOnDrag; +extern wxCursor g_globalCursor; +extern wxWindowGTK *g_delayedFocus; //----------------------------------------------------------------------------- // "clicked" @@ -206,6 +207,15 @@ void wxCheckBox::OnInternalIdle() gdk_window_set_cursor( event_window, cursor.GetCursor() ); } + if (g_delayedFocus == this) + { + if (GTK_WIDGET_REALIZED(m_widget)) + { + gtk_widget_grab_focus( m_widget ); + g_delayedFocus = NULL; + } + } + UpdateWindowUI(); }