mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
shortcutcontroller: Only do round-robin for mnemonics
Don't do round-robin activation unless we are looking for mnemonics, where this is an expected feature. Fixes: #4130
This commit is contained in:
parent
ca547b8716
commit
f8a1726ffa
@ -310,7 +310,14 @@ gtk_shortcut_controller_run_controllers (GtkEventController *controller,
|
||||
GtkWidget *widget;
|
||||
GtkNative *native;
|
||||
|
||||
index = (self->last_activated + 1 + i) % g_list_model_get_n_items (self->shortcuts);
|
||||
/* This is not entirely right, but we only want to do round-robin cycling
|
||||
* for mnemonics.
|
||||
*/
|
||||
if (enable_mnemonics)
|
||||
index = (self->last_activated + 1 + i) % g_list_model_get_n_items (self->shortcuts);
|
||||
else
|
||||
index = i;
|
||||
|
||||
shortcut = g_list_model_get_item (self->shortcuts, index);
|
||||
if (!GTK_IS_SHORTCUT (shortcut))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user