menu button: Use proper focus api

Widgets are supposed to call gtk_widget_child_focus.
Calling internal focus_move function directly makes
us skip the childs ::focus() implementation, which
is where the magic happens.
This commit is contained in:
Matthias Clasen 2019-06-09 02:19:30 +00:00
parent f01e5d2267
commit ae8373f116

View File

@ -521,9 +521,9 @@ gtk_menu_button_focus (GtkWidget *widget,
GtkMenuButtonPrivate *priv = gtk_menu_button_get_instance_private (button);
if (priv->menu && gtk_widget_get_visible (priv->menu))
return gtk_widget_focus_move (priv->menu, direction);
return gtk_widget_child_focus (priv->menu, direction);
else if (priv->popover && gtk_widget_get_visible (priv->popover))
return gtk_widget_focus_move (priv->popover, direction);
return gtk_widget_child_focus (priv->popover, direction);
else
return GTK_WIDGET_CLASS (gtk_menu_button_parent_class)->focus (widget, direction);
}