diff options
author | Benjamin Otte <otte@gnome.org> | 2009-08-06 16:25:20 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2009-08-06 16:39:19 +0200 |
commit | 6e0af6c25225440263792a3cbecd8f4301e3def5 (patch) | |
tree | 15b187a443c7acd99eabf0d4acb32e8dda20c83a /gtk/gtknotebook.c | |
parent | c44b0d2f7a587b70b207d3168b018c2d6db56496 (diff) | |
download | gtk+-6e0af6c25225440263792a3cbecd8f4301e3def5.tar.gz |
Bug 590959 - Set child_has_focus flag properly
Previously, this flag wasn't cleared properly when the notebook lost
focus, but only when the notebook was focussed again later.
As this flag is only used to advance correctly focus pages by grabbing
focus to the new page after switching the page, this is not good.
In particular, it can cause a focus grab when programmatically switching
the notebook page and the focus is inside a completely different widget.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index aa1a5ade06..a349add786 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3094,8 +3094,6 @@ static gint gtk_notebook_focus_in (GtkWidget *widget, GdkEventFocus *event) { - GTK_NOTEBOOK (widget)->child_has_focus = FALSE; - gtk_notebook_redraw_tabs (GTK_NOTEBOOK (widget)); return FALSE; @@ -3978,6 +3976,8 @@ gtk_notebook_set_focus_child (GtkContainer *container, } } } + else + notebook->child_has_focus = FALSE; GTK_CONTAINER_CLASS (gtk_notebook_parent_class)->set_focus_child (container, child); } |