[gtk/wip/baedert/filechooser: 5/9] treevie: Don't grab the focus from inside move-cursor



commit ba2cd1a39a520823a4b79e23d6dd56a49cca6bb5
Author: Timm Bäder <mail baedert org>
Date:   Tue Jan 15 06:22:58 2019 +0100

    treevie: Don't grab the focus from inside move-cursor
    
    It doesn't make sense since gtk_tree_view_move_cursor_up_down already
    returns early if the treeview doesn't already have the keyboard focus.

 gtk/gtktreeview.c | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index bf2437e3db..cc3ee26bc8 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9460,7 +9460,6 @@ gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view,
   GtkTreeRBTree *new_cursor_tree = NULL;
   GtkTreeRBNode *new_cursor_node = NULL;
   GtkTreePath *cursor_path = NULL;
-  gboolean grab_focus = TRUE;
   gboolean selectable;
   GtkDirectionType direction;
   GtkCellArea *cell_area = NULL;
@@ -9595,8 +9594,6 @@ gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view,
                                         count < 0 ?
                                         GTK_DIR_TAB_BACKWARD :
                                         GTK_DIR_TAB_FORWARD);
-
-              grab_focus = FALSE;
             }
         }
       else
@@ -9607,9 +9604,6 @@ gtk_tree_view_move_cursor_up_down (GtkTreeView *tree_view,
       if (cell_area)
        gtk_cell_area_set_focus_cell (cell_area, last_focus_cell);
     }
-
-  if (grab_focus)
-    gtk_widget_grab_focus (GTK_WIDGET (tree_view));
 }
 
 static void


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