popover: Improve the move-focus fix

Avoid breaking menubar keynav (we still
need the focus change to be propagated
down from the root).
This commit is contained in:
Matthias Clasen 2019-06-13 00:11:32 +00:00
parent 5b0002a9dc
commit 6c7cb8d862

View File

@ -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