[gtk] popover: Improve the move-focus fix
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] popover: Improve the move-focus fix
- Date: Thu, 13 Jun 2019 01:51:41 +0000 (UTC)
commit 6c7cb8d862ce5a0e8eb0323e05b88fb6114a6c7a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 13 00:11:32 2019 +0000
popover: Improve the move-focus fix
Avoid breaking menubar keynav (we still
need the focus change to be propagated
down from the root).
gtk/gtkpopover.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index d4d2470ef6..7ac8b7b4bf 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -639,12 +639,9 @@ gtk_popover_unrealize (GtkWidget *widget)
static void
gtk_popover_move_focus (GtkWidget *widget,
- GtkDirectionType dir)
+ GtkDirectionType direction)
{
- gtk_widget_child_focus (widget, dir);
-
- if (!gtk_widget_get_focus_child (widget))
- gtk_root_set_focus (GTK_ROOT (widget), NULL);
+ g_signal_emit_by_name (gtk_widget_get_root (widget), "move-focus", direction);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]