mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
shortcuts: Ignore consumed modifiers for mnemonics
This is necessary to make mnemonics like Alt-1 work in layouts where numeric keys are shifted, like AZERTY. Fixes: #3912
This commit is contained in:
parent
7578a18cd6
commit
6a5f93ff95
@ -432,9 +432,11 @@ gtk_shortcut_controller_handle_event (GtkEventController *controller,
|
||||
|
||||
if (event_type == GDK_KEY_PRESS)
|
||||
{
|
||||
GdkModifierType modifiers;
|
||||
GdkModifierType modifiers, consumed_modifiers;
|
||||
|
||||
modifiers = gdk_event_get_modifier_state (event);
|
||||
enable_mnemonics = (modifiers & gtk_accelerator_get_default_mod_mask ()) == self->mnemonics_modifiers;
|
||||
consumed_modifiers = gdk_key_event_get_consumed_modifiers (event);
|
||||
enable_mnemonics = (modifiers & ~consumed_modifiers & gtk_accelerator_get_default_mod_mask ()) == self->mnemonics_modifiers;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user