mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
evdev: Set event code on button/key events
This will allow users to know the event code without strange calculations on event->key.hardware_keycode or event->button.button. https://bugzilla.gnome.org/show_bug.cgi?id=758238
This commit is contained in:
parent
f1ad702309
commit
8aeea7fb73
@ -312,6 +312,7 @@ notify_key_device (ClutterInputDevice *input_device,
|
|||||||
seat->xkb,
|
seat->xkb,
|
||||||
seat->button_state,
|
seat->button_state,
|
||||||
time_, key, state);
|
time_, key, state);
|
||||||
|
_clutter_evdev_event_set_event_code (event, key);
|
||||||
|
|
||||||
/* We must be careful and not pass multiple releases to xkb, otherwise it gets
|
/* We must be careful and not pass multiple releases to xkb, otherwise it gets
|
||||||
confused and locks the modifiers */
|
confused and locks the modifiers */
|
||||||
@ -652,6 +653,8 @@ notify_button (ClutterInputDevice *input_device,
|
|||||||
clutter_event_set_device (event, seat->core_pointer);
|
clutter_event_set_device (event, seat->core_pointer);
|
||||||
clutter_event_set_source_device (event, input_device);
|
clutter_event_set_source_device (event, input_device);
|
||||||
|
|
||||||
|
_clutter_evdev_event_set_event_code (event, button);
|
||||||
|
|
||||||
_clutter_input_device_set_stage (seat->core_pointer, stage);
|
_clutter_input_device_set_stage (seat->core_pointer, stage);
|
||||||
|
|
||||||
queue_event (event);
|
queue_event (event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user