Associate the device to a stage on touch events

Just like we do for crossing events, we need to update the stage pointer
inside ClutterInputDevice on TOUCH_BEGIN and TOUCH_END.

https://bugzilla.gnome.org/show_bug.cgi?id=681074
This commit is contained in:
Emmanuele Bassi 2012-08-15 17:15:06 +01:00
parent 6a13a5bd3c
commit 803b3bafb6

View File

@ -2678,7 +2678,10 @@ _clutter_process_event_details (ClutterActor *stage,
clutter_event_get_event_sequence (event);
if (event->type == CLUTTER_TOUCH_BEGIN)
_clutter_input_device_add_sequence (device, sequence);
{
_clutter_stage_add_device (CLUTTER_STAGE (stage), device);
_clutter_input_device_add_sequence (device, sequence);
}
clutter_event_get_coords (event, &x, &y);
@ -2713,7 +2716,10 @@ _clutter_process_event_details (ClutterActor *stage,
emit_touch_event (event, device);
if (event->type == CLUTTER_TOUCH_END)
_clutter_input_device_remove_sequence (device, sequence);
{
_clutter_stage_remove_device (CLUTTER_STAGE (stage), device);
_clutter_input_device_remove_sequence (device, sequence);
}
break;
}