mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-19 00:20:09 +00:00
bindings: Convert to use GdkEvent API
This commit is contained in:
parent
5488009150
commit
01b993d1fb
@ -1580,6 +1580,9 @@ gtk_bindings_activate_event (GObject *object,
|
||||
GdkDisplay *display;
|
||||
GtkKeyHash *key_hash;
|
||||
gboolean handled = FALSE;
|
||||
guint16 keycode;
|
||||
GdkModifierType state;
|
||||
guint group;
|
||||
|
||||
if (!GTK_IS_WIDGET (object))
|
||||
return FALSE;
|
||||
@ -1587,11 +1590,15 @@ gtk_bindings_activate_event (GObject *object,
|
||||
display = gtk_widget_get_display (GTK_WIDGET (object));
|
||||
key_hash = binding_key_hash_for_keymap (gdk_keymap_get_for_display (display));
|
||||
|
||||
gdk_event_get_keycode ((GdkEvent *)event, &keycode);
|
||||
gdk_event_get_state ((GdkEvent *)event, &state);
|
||||
gdk_event_get_key_group ((GdkEvent *)event, &group);
|
||||
|
||||
entries = _gtk_key_hash_lookup (key_hash,
|
||||
event->hardware_keycode,
|
||||
event->state,
|
||||
keycode,
|
||||
state,
|
||||
BINDING_MOD_MASK () & ~GDK_RELEASE_MASK,
|
||||
event->group);
|
||||
group);
|
||||
|
||||
handled = gtk_bindings_activate_list (object, entries,
|
||||
gdk_event_get_event_type ((GdkEvent *) event) == GDK_KEY_RELEASE);
|
||||
|
Loading…
Reference in New Issue
Block a user