From ce261025f6dfd34153382cb69bcb7fb11b8e2561 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 28 Apr 2010 16:19:37 +0100 Subject: [PATCH] Fix clutter_event_get_coords() for crossing events The ClutterCrossingEvent data structure contains the coordinates of the crossing; they are regularly filed out by Clutter and by the backend event processing code. And yet clutter_event_get_coords() returns (0, 0) because it thinks that CLUTTER_ENTER and CLUTTER_LEAVE events do not have coordinates. --- clutter/clutter-event.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clutter/clutter-event.c b/clutter/clutter-event.c index 6e91be8f0..4eec2205d 100644 --- a/clutter/clutter-event.c +++ b/clutter/clutter-event.c @@ -145,8 +145,12 @@ clutter_event_get_coords (ClutterEvent *event, case CLUTTER_DESTROY_NOTIFY: case CLUTTER_CLIENT_MESSAGE: case CLUTTER_DELETE: + break; + case CLUTTER_ENTER: case CLUTTER_LEAVE: + event_x = event->crossing.x; + event_y = event->crossing.y; break; case CLUTTER_BUTTON_PRESS: