[clutter] evdev: Set event code on button/key events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] evdev: Set event code on button/key events
- Date: Wed, 18 Nov 2015 12:05:56 +0000 (UTC)
commit 8aeea7fb7351ff6c9e6edf42b529803ac1699a90
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 17 17:44:19 2015 +0100
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
clutter/evdev/clutter-device-manager-evdev.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c
index ccc923e..37bb507 100644
--- a/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/evdev/clutter-device-manager-evdev.c
@@ -312,6 +312,7 @@ notify_key_device (ClutterInputDevice *input_device,
seat->xkb,
seat->button_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
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_source_device (event, input_device);
+ _clutter_evdev_event_set_event_code (event, button);
+
_clutter_input_device_set_stage (seat->core_pointer, stage);
queue_event (event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]