Commit e874a29c authored by Padraig O'Briain's avatar Padraig O'Briain
Browse files

Move focus to children, if they exist, after GtkTextView is focused.

* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
parent 4ce6b465
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
2002-08-14 Padraig O'Briain <padraig.obriain@sun.com>
* gtk/gtktextview.c (gtk_text_view_focus): Move focus to
children, if they exist, after GtkTextView is focused. (#63844)
2002-08-12 Matthias Clasen <maclas@gmx.de>
* gdk/gdkdisplaymanager.c:
......
......@@ -4196,11 +4196,29 @@ gtk_text_view_focus (GtkWidget *widget,
{
GtkTextView *text_view;
GtkContainer *container;
gboolean result;
text_view = GTK_TEXT_VIEW (widget);
container = GTK_CONTAINER (widget);
return GTK_WIDGET_CLASS (parent_class)->focus (widget, direction);
if (!gtk_widget_is_focus (widget) &&
container->focus_child == NULL)
{
gtk_widget_grab_focus (widget);
return TRUE;
}
else
{
/*
* Unset CAN_FOCUS flag so that gtk_container_focus() allows
* children to get the focus
*/
GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
result = GTK_WIDGET_CLASS (parent_class)->focus (widget, direction);
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
return result;
}
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment