shortcut controller: Fix mnemonic cycling
Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.
This broke in fb9b54d4b2 when a list was
turned into an array.
This commit is contained in:
@@ -373,7 +373,8 @@ gtk_shortcut_controller_run_controllers (GtkEventController *controller,
|
||||
if (!shortcuts)
|
||||
return retval;
|
||||
|
||||
for (i = shortcuts->len - 1, p = shortcuts->len; i >= 0; i--)
|
||||
p = shortcuts->len;
|
||||
for (i = 0; i < shortcuts->len; i++)
|
||||
{
|
||||
const ShortcutData *data = &g_array_index (shortcuts, ShortcutData, i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user