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.
This commit is contained in:
Emmanuele Bassi 2010-04-28 16:19:37 +01:00
parent b7098563c2
commit ce261025f6

View File

@ -145,8 +145,12 @@ clutter_event_get_coords (ClutterEvent *event,
case CLUTTER_DESTROY_NOTIFY: case CLUTTER_DESTROY_NOTIFY:
case CLUTTER_CLIENT_MESSAGE: case CLUTTER_CLIENT_MESSAGE:
case CLUTTER_DELETE: case CLUTTER_DELETE:
break;
case CLUTTER_ENTER: case CLUTTER_ENTER:
case CLUTTER_LEAVE: case CLUTTER_LEAVE:
event_x = event->crossing.x;
event_y = event->crossing.y;
break; break;
case CLUTTER_BUTTON_PRESS: case CLUTTER_BUTTON_PRESS: