A number of focus handling improvements:

Left clicking on a window only focuses the window if not processed.
wxControlContainer::SetFocus moved to wxControlContainerBase so that a container now focuses the first child even on wxGTK.
wxAuiBook is now a container, need for correct navigation on wxGTK.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-18 10:54:31 +00:00
parent 927f01da61
commit c7bfb76a2c
5 changed files with 108 additions and 80 deletions

View File

@@ -1440,11 +1440,6 @@ gtk_window_button_press_callback( GtkWidget *widget,
g_lastButtonNumber = gdk_event->button;
if (win->m_wxwindow && (g_focusWindow != win) && win->IsFocusable())
{
gtk_widget_grab_focus( win->m_wxwindow );
}
// GDK sends surplus button down events
// before a double click event. We
// need to filter these out.
@@ -1576,9 +1571,9 @@ gtk_window_button_press_callback( GtkWidget *widget,
return TRUE;
if ((event_type == wxEVT_LEFT_DOWN) && !win->IsOfStandardClass() &&
(g_focusWindow != win) && win->IsFocusable())
(g_focusWindow != win) /* && win->IsFocusable() */)
{
gtk_widget_grab_focus( win->m_wxwindow );
win->SetFocus();
}
if (event_type == wxEVT_RIGHT_DOWN)
@@ -1870,7 +1865,9 @@ gtk_window_focus_out_callback( GtkWidget *widget,
// Disable default focus handling for custom windows
// since the default GTK+ handler issues a repaint
if ( has_wxwindow )
{
return TRUE;
}
}
// continue with normal processing