[gtk/css-focus-changes] fixup: Set focus-within on the focus location too
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/css-focus-changes] fixup: Set focus-within on the focus location too
- Date: Thu, 16 Apr 2020 12:47:43 +0000 (UTC)
commit 152580ee15238014cadab20ea0602c077b55b803
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 16 08:46:49 2020 -0400
fixup: Set focus-within on the focus location too
gtk/gtkwindow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index eeb9a6998f..3bd8d30e9f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5568,7 +5568,7 @@ synthesize_focus_change_events (GtkWindow *window,
else
ancestor = NULL;
- flags = GTK_STATE_FLAG_FOCUSED;
+ flags = GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_FOCUS_WITHIN;
if (gtk_window_get_focus_visible (GTK_WINDOW (window)))
flags |= GTK_STATE_FLAG_FOCUS_VISIBLE;
@@ -5613,7 +5613,7 @@ synthesize_focus_change_events (GtkWindow *window,
prev = widget;
widget = gtk_widget_get_parent (widget);
- flags = (flags & ~GTK_STATE_FLAG_FOCUSED) | GTK_STATE_FLAG_FOCUS_WITHIN;
+ flags = flags & ~GTK_STATE_FLAG_FOCUSED;
}
flags = GTK_STATE_FLAG_FOCUS_WITHIN;
@@ -5660,7 +5660,7 @@ synthesize_focus_change_events (GtkWindow *window,
gtk_widget_handle_crossing (widget, &crossing, 0, 0);
if (l->next == NULL)
- flags = (flags & ~GTK_STATE_FLAG_FOCUS_WITHIN) | GTK_STATE_FLAG_FOCUSED;
+ flags = flags | GTK_STATE_FLAG_FOCUSED;
gtk_widget_set_state_flags (widget, flags, FALSE);
gtk_widget_set_focus_child (widget, focus_child);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]