diff options
author | Chris Lord <chris@linux.intel.com> | 2010-06-29 15:30:25 +0100 |
---|---|---|
committer | Chris Lord <chris@linux.intel.com> | 2010-06-29 15:32:12 +0100 |
commit | 8769a627012463ace69d84b607c2e4387c0a8c0b (patch) | |
tree | 9ae36f6e18aabe39190ce801945f027a5a8f11af | |
parent | e32b04295c047e59b1e478cfcdfe262cda28079a (diff) | |
download | clutter-8769a627012463ace69d84b607c2e4387c0a8c0b.tar.gz |
event: Typos in event code could cause crashes
A typo in clutter-event.c meant that the wrong struct location could be
used for the input device of key events. Also, a typo in the X11 event
code meant that key-presses would come from the pointer device (releases
would still come from the keyboard device).
-rw-r--r-- | clutter/clutter-event.c | 2 | ||||
-rw-r--r-- | clutter/x11/clutter-event-x11.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clutter/clutter-event.c b/clutter/clutter-event.c index 4eec2205d..d6755cb22 100644 --- a/clutter/clutter-event.c +++ b/clutter/clutter-event.c @@ -575,7 +575,7 @@ clutter_event_get_device (ClutterEvent *event) case CLUTTER_KEY_PRESS: case CLUTTER_KEY_RELEASE: - device = event->scroll.device; + device = event->key.device; break; } diff --git a/clutter/x11/clutter-event-x11.c b/clutter/x11/clutter-event-x11.c index 20a77fd06..1313b01c3 100644 --- a/clutter/x11/clutter-event-x11.c +++ b/clutter/x11/clutter-event-x11.c @@ -657,7 +657,7 @@ event_translate (ClutterBackend *backend, event->key.type = event->type = CLUTTER_KEY_PRESS; event->key.device = clutter_device_manager_get_core_device (manager, - CLUTTER_POINTER_DEVICE); + CLUTTER_KEYBOARD_DEVICE); translate_key_event (backend, event, xevent); |