[gtk/wip/baedert/filechooser2: 7/10] treeview: Don't always grab_focus() when moving the cursor
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/filechooser2: 7/10] treeview: Don't always grab_focus() when moving the cursor
- Date: Sun, 28 Apr 2019 10:34:57 +0000 (UTC)
commit 929cdd925927fcabdb353a0322b8f17b9e6104a4
Author: Timm Bäder <mail baedert org>
Date: Sun Apr 28 11:26:40 2019 +0200
treeview: Don't always grab_focus() when moving the cursor
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
gtk/gtktreeview.c | 9 ---------
1 file changed, 9 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ee55b0dd6b..077101e579 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9394,16 +9394,12 @@ 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;
GtkCellRenderer *last_focus_cell = NULL;
GtkTreeIter iter;
- if (! gtk_widget_has_focus (GTK_WIDGET (tree_view)))
- return;
-
if (tree_view->priv->cursor_node == NULL)
return;
@@ -9529,8 +9525,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
@@ -9541,9 +9535,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]