[gtk/focusable-property: 159/160] widget: Fix gtk_widget_focus_all for !focusable
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/focusable-property: 159/160] widget: Fix gtk_widget_focus_all for !focusable
- Date: Mon, 11 May 2020 04:13:20 +0000 (UTC)
commit 46bad5d513e4715a912123f825226f3f2b096f06
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 10 23:42:02 2020 -0400
widget: Fix gtk_widget_focus_all for !focusable
This was a case that wasn't handle properly when
the focus is entering from the outside, in forward
direction.
gtk/gtkwidget.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 17e21b8b36..95639e7980 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4982,9 +4982,16 @@ gtk_widget_focus_all (GtkWidget *widget,
{
if (gtk_widget_focus_move (widget, direction))
return TRUE;
+
+ return gtk_widget_grab_focus (widget);
}
+ else
+ {
+ if (gtk_widget_grab_focus (widget))
+ return TRUE;
- return gtk_widget_grab_focus (widget);
+ return gtk_widget_focus_move (widget, direction);
+ }
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]