}
#endif // wxUSE_CARET
+ bool ret = FALSE;
+
// does the window itself think that it has the focus?
if ( !win->m_hasFocus )
{
// not yet, notify it
win->m_hasFocus = true;
- if ( DoSendFocusEvents(win) )
- {
- g_signal_stop_emission_by_name (widget, "focus_in_event");
- return TRUE;
- }
+ (void)DoSendFocusEvents(win);
+
+ ret = TRUE;
}
- return FALSE;
+ // Disable default focus handling for custom windows
+ // since the default GTK+ handler issues a repaint
+ if (win->m_wxwindow)
+ g_signal_stop_emission_by_name (widget, "focus_in_event");
+
+ return ret;
}
}
}
#endif // wxUSE_CARET
+ bool ret = FALSE;
+
// don't send the window a kill focus event if it thinks that it doesn't
// have focus already
if ( win->m_hasFocus )
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
event.SetEventObject( win );
- // even if we did process the event in wx code, still let GTK itself
- // process it too as otherwise bad things happen, especially in GTK2
- // where the text control simply aborts the program if it doesn't get
- // the matching focus out event
(void)win->GetEventHandler()->ProcessEvent( event );
+
+ ret = TRUE;
}
-
- return FALSE;
+
+ // Disable default focus handling for custom windows
+ // since the default GTK+ handler issues a repaint
+ if (win->m_wxwindow)
+ g_signal_stop_emission_by_name (widget, "focus_out_event");
+
+ return ret;
}
}