GtkMenuButton: disable focus-on-click
As general rule, all buttons that launch a menu should not grab focus on click, because otherwise when the menu is closed the focus goes back to the button instead of the previously focused widget, which is the one the user was interacting with. GtkScaleButton and GtkVolumeButton set focus-on-click to FALSE for this same reason. Fixes #2557
This commit is contained in:
parent
56eeda6c7c
commit
527a99e598
@ -621,6 +621,7 @@ gtk_menu_button_init (GtkMenuButton *menu_button)
|
||||
|
||||
add_arrow (menu_button);
|
||||
|
||||
gtk_widget_set_focus_on_click (GTK_WIDGET (menu_button), FALSE);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (menu_button), FALSE);
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (menu_button));
|
||||
|
Loading…
Reference in New Issue
Block a user