forked from AuroraMiddleware/gtk
shortcuttrigger: Don't trigger on key releases
This broke when the event type check in gdk_key_event_matches was removed and replaced by a precondition that accepts both key press and release events. Add the check in gtk_keyval_trigger_trigger instead.
This commit is contained in:
parent
0b17658a82
commit
eb649d8204
@ -516,6 +516,9 @@ gtk_keyval_trigger_trigger (GtkShortcutTrigger *trigger,
|
||||
{
|
||||
GtkKeyvalTrigger *self = GTK_KEYVAL_TRIGGER (trigger);
|
||||
|
||||
if (gdk_event_get_event_type (event) != GDK_KEY_PRESS)
|
||||
return GDK_KEY_MATCH_NONE;
|
||||
|
||||
return gdk_key_event_matches (event, self->keyval, self->modifiers);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user