X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aeb6f2a5810694b5241eb267d71dab4848cf8bb..3d9fe7b26de338412e6fe34b8a76bfd64d0f265c:/src/gtk/toplevel.cpp?ds=sidebyside diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 9f5beeea7c..534759fca7 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -248,10 +248,6 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW // wxTopLevelWindowGTK itself // ---------------------------------------------------------------------------- -BEGIN_EVENT_TABLE(wxTopLevelWindowGTK, wxTopLevelWindowBase) - EVT_SET_FOCUS(wxTopLevelWindowGTK::OnSetFocus) -END_EVENT_TABLE() - //----------------------------------------------------------------------------- // InsertChild for wxTopLevelWindowGTK //----------------------------------------------------------------------------- @@ -765,7 +761,8 @@ void wxTopLevelWindowGTK::OnInternalIdle() // set the focus if not done yet and if we can already do it if ( GTK_WIDGET_REALIZED(m_wxwindow) ) { - if ( g_delayedFocus && wxGetTopLevelParent(g_delayedFocus) == this ) + if ( g_delayedFocus && + wxGetTopLevelParent((wxWindow*)g_delayedFocus) == this ) { g_delayedFocus->SetFocus(); g_delayedFocus = NULL; @@ -775,19 +772,6 @@ void wxTopLevelWindowGTK::OnInternalIdle() wxWindow::OnInternalIdle(); } -void wxTopLevelWindowGTK::OnSetFocus(wxFocusEvent& event) -{ -#if 0 - if ( !g_delayedFocus || wxGetTopLevelParent(g_delayedFocus) != this ) - { - // let the base class version set the focus to the first child which - // accepts it - event.Skip(); - } - //else: the focus will be really set from OnInternalIdle() later -#endif -} - // ---------------------------------------------------------------------------- // frame title/icon // ----------------------------------------------------------------------------