[clutter/wip/touch-events] tests: Fix some warnings



commit d84a9a5d73f289c3c8d6310c632999430203df35
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date:   Mon Jun 4 10:55:36 2012 +0200

    tests: Fix some warnings
    
    Also stop leaking the event list

 tests/interactive/test-touch-events.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tests/interactive/test-touch-events.c b/tests/interactive/test-touch-events.c
index 57a3e74..c5ea60e 100644
--- a/tests/interactive/test-touch-events.c
+++ b/tests/interactive/test-touch-events.c
@@ -39,7 +39,7 @@ static const ClutterColor const static_colors[] = {
 };
 
 static void
-canvas_paint (ClutterActor *canvas)
+canvas_paint (ClutterCairoTexture *canvas)
 {
   clutter_cairo_texture_invalidate (canvas);
 }
@@ -48,14 +48,14 @@ static void
 draw_touch (ClutterEvent *event,
             cairo_t      *cr)
 {
-  unsigned int sequence = clutter_event_get_event_sequence (event);
+  gulong sequence = (gulong) clutter_event_get_event_sequence (event);
   ClutterColor color = static_colors[sequence % NUM_COLORS];
 
   cairo_set_source_rgba (cr, color.red / 255,
                              color.green / 255,
                              color.blue / 255,
                              color.alpha / 255);
-  cairo_arc (cr, event->motion.x, event->motion.y, 5, 0, 2 * G_PI);
+  cairo_arc (cr, event->touch.x, event->touch.y, 5, 0, 2 * G_PI);
   cairo_fill (cr);
 }
 
@@ -114,6 +114,8 @@ test_touch_events_main (int argc, char *argv[])
 
   clutter_main ();
 
+  g_slist_free_full (events, (GDestroyNotify) clutter_event_free);
+
   return EXIT_SUCCESS;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]