+static gint gtk_radiobutton_focus_in( GtkWidget *widget,
+ GdkEvent *WXUNUSED(event),
+ wxRadioBox *win )
+{
+ if ( win->m_lostFocus )
+ {
+ // no, we didn't really lose it
+ win->m_lostFocus = FALSE;
+ }
+ else if ( !win->m_hasFocus )
+ {
+ win->m_hasFocus = TRUE;
+
+ wxFocusEvent event( wxEVT_SET_FOCUS, win->GetId() );
+ event.SetEventObject( win );
+
+ // never stop the signal emission, it seems to break the kbd handling
+ // inside the radiobox
+ (void)win->GetEventHandler()->ProcessEvent( event );
+ }
+
+ return FALSE;
+}
+
+static gint gtk_radiobutton_focus_out( GtkWidget *widget,
+ GdkEvent *WXUNUSED(event),
+ wxRadioBox *win )
+{
+ // wxASSERT_MSG( win->m_hasFocus, _T("got focus out without any focus in?") );
+ // Replace with a warning, else we dump core a lot!
+ // if (!win->m_hasFocus)
+ // wxLogWarning(_T("Radiobox got focus out without any focus in.") );
+
+ // we might have lost the focus, but may be not - it may have just gone to
+ // another button in the same radiobox, so we'll check for it in the next
+ // idle iteration (leave m_hasFocus == TRUE for now)
+ win->m_lostFocus = TRUE;
+
+ return FALSE;
+}
+