forked from AuroraMiddleware/gtk
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:
parent
f01e5d2267
commit
ae8373f116
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user