From: Chris Lord Date: Tue, 29 Jun 2010 14:30:25 +0000 (+0100) Subject: event: Typos in event code could cause crashes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8801c947d556e81b39691d819898e377092d6f59;p=profile%2Fivi%2Fclutter.git 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). --- 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);