summaryrefslogtreecommitdiff
path: root/gtk/gtkscrolledwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkscrolledwindow.c')
-rw-r--r--gtk/gtkscrolledwindow.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 963f652706..9f8d4c984c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1234,6 +1234,7 @@ gtk_scrolled_window_focus (GtkWidget *widget,
GtkDirectionType direction)
{
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
+ gboolean had_focus_child = GTK_CONTAINER (widget)->focus_child != NULL;
if (scrolled_window->focus_out)
{
@@ -1253,8 +1254,13 @@ gtk_scrolled_window_focus (GtkWidget *widget,
return TRUE;
}
- gtk_widget_grab_focus (widget);
- return TRUE;
+ if (!had_focus_child)
+ {
+ gtk_widget_grab_focus (widget);
+ return TRUE;
+ }
+ else
+ return FALSE;
}
static void