From 803b3bafb617c2df703aa8b834ff0df2f0c5c26c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 15 Aug 2012 17:15:06 +0100 Subject: [PATCH] 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 --- clutter/clutter-main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index e9a56eeae..f5d3de139 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -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; }