diff options
author | Timm Bäder <mail@baedert.org> | 2017-02-08 09:00:29 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-03-31 09:50:39 +0200 |
commit | 43cdeee3c4a5486664e68394d08469c5a39770a3 (patch) | |
tree | 41a6e5acc22fcb59be2347a587ee5030a28fce40 /gtk/gtkcontainer.c | |
parent | 2bab2048f9c44a11b8bc5328abbe63b8c3cb084c (diff) | |
download | gtk+-43cdeee3c4a5486664e68394d08469c5a39770a3.tar.gz |
widget: Save pointer to focus child
Do the same thing GtkContainer does.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 8968983886..206589248d 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -2114,10 +2114,9 @@ gtk_container_real_set_focus_child (GtkContainer *container, { focus_child = priv->focus_child; - while (GTK_IS_CONTAINER (focus_child) && gtk_container_get_focus_child (GTK_CONTAINER (focus_child))) - { - focus_child = gtk_container_get_focus_child (GTK_CONTAINER (focus_child)); - } + + while (gtk_widget_get_focus_child (focus_child)) + focus_child = gtk_widget_get_focus_child (focus_child); gtk_widget_translate_coordinates (focus_child, priv->focus_child, 0, 0, &x, &y); @@ -2310,7 +2309,7 @@ find_old_focus (GtkContainer *container, parent = _gtk_widget_get_parent (widget); - if (parent && (gtk_container_get_focus_child (GTK_CONTAINER (parent)) != widget)) + if (parent && (gtk_widget_get_focus_child (parent) != widget)) goto next; widget = parent; |