[gnome-builder] Fix switching pages doesn't focus the source view



commit bcfe8828d537ad40bc640c8ebb775062a9e7ab37
Author: Nicholas Harvey <727-FrostyPenguin users noreply gitlab gnome org>
Date:   Sat Dec 8 18:33:07 2018 +0100

    Fix switching pages doesn't focus the source view
    
    This fixes #737
    
    Signed-off-by: Nicholas Harvey <727-FrostyPenguin users noreply gitlab gnome org>

 src/libide/layout/ide-layout-stack-header.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/layout/ide-layout-stack-header.c b/src/libide/layout/ide-layout-stack-header.c
index f9cb963cc..e11dcefa0 100644
--- a/src/libide/layout/ide-layout-stack-header.c
+++ b/src/libide/layout/ide-layout-stack-header.c
@@ -303,8 +303,11 @@ ide_layout_stack_header_view_row_activated (GtkListBox           *list_box,
   view = g_object_get_data (G_OBJECT (row), "IDE_LAYOUT_VIEW");
 
   if (stack != NULL && view != NULL)
-    ide_layout_stack_set_visible_child (IDE_LAYOUT_STACK (stack),
-                                        IDE_LAYOUT_VIEW (view));
+    {
+      ide_layout_stack_set_visible_child (IDE_LAYOUT_STACK (stack),
+                                          IDE_LAYOUT_VIEW (view));
+      gtk_widget_grab_focus (view);
+    }
 
   _ide_layout_stack_header_popdown (self);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]