From 8801c947d556e81b39691d819898e377092d6f59 Mon Sep 17 00:00:00 2001 From: Chris Lord Date: Tue, 29 Jun 2010 15:30:25 +0100 Subject: [PATCH] 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). --- clutter/clutter-event.c | 2 +- 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 4eec220..d6755cb 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 1a465a3..28bb4b3 100644 --- a/clutter/x11/clutter-event-x11.c +++ b/clutter/x11/clutter-event-x11.c @@ -667,7 +667,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); -- 2.7.4