[gtk/matthiasc/for-master: 1/4] listbox: Make Shift-Tab work again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 1/4] listbox: Make Shift-Tab work again
- Date: Thu, 14 May 2020 01:48:02 +0000 (UTC)
commit 7915e998e2459eee04f0fc52d018183d26c2a4d2
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 13 21:45:25 2020 -0400
listbox: Make Shift-Tab work again
The previous fix broke the case where we're Shift-Tabbing
from a listboxrow child to the row itself. This was causing
the widget-factory2.tab-backward test to fail. Fix it, by
grabbing the focus to the row explicitly.
gtk/gtklistbox.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index bc4676566f..11e64e95ae 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2944,6 +2944,10 @@ gtk_list_box_row_focus (GtkWidget *widget,
/* If exiting child container to the left, select row */
if (direction == GTK_DIR_LEFT || direction == GTK_DIR_TAB_BACKWARD)
{
+ /* grab focus explicitly, since gtk_list_box_row_set_focus()
+ * refuses to steal it from a child
+ */
+ gtk_widget_grab_focus (GTK_WIDGET (row));
gtk_list_box_row_set_focus (row);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]