[clutter] Associate the device to a stage on touch events
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Associate the device to a stage on touch events
- Date: Thu, 16 Aug 2012 11:24:23 +0000 (UTC)
commit 803b3bafb617c2df703aa8b834ff0df2f0c5c26c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Aug 15 17:15:06 2012 +0100
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 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index e9a56ee..f5d3de1 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]