From: Pierre-Luc Beaudoin Date: Wed, 4 Feb 2009 06:14:54 +0000 (+0200) Subject: Idle calls should actually returns FALSE X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1912470c0086d7dec88dd31c6716ce6122f041a1;p=libchamplain Idle calls should actually returns FALSE The previous commit introduced a bug where the CPU would be at 100% at all time because of accumulating looping idle calls. --- diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c index 22c05b4..1895b25 100644 --- a/champlain/champlain-view.c +++ b/champlain/champlain-view.c @@ -131,7 +131,7 @@ static gboolean scroll_event (ClutterActor *actor, ClutterScrollEvent *event, ChamplainView *view); static void marker_reposition_cb (ChamplainMarker *marker, ChamplainView *view); static void layer_reposition_cb (ClutterActor *layer, ChamplainView *view); -static void marker_reposition (ChamplainView *view); +static gboolean marker_reposition (gpointer data); static void create_initial_map (ChamplainView *view); static void resize_viewport (ChamplainView *view); static void champlain_view_get_property (GObject *object, guint prop_id, @@ -314,12 +314,14 @@ layer_reposition_cb (ClutterActor *layer, CLUTTER_CALLBACK (marker_reposition_cb), view); } -static void -marker_reposition (ChamplainView *view) +static gboolean +marker_reposition (gpointer data) { + ChamplainView *view = CHAMPLAIN_VIEW (data); ChamplainViewPrivate *priv = GET_PRIVATE (view); clutter_container_foreach (CLUTTER_CONTAINER (priv->user_layers), CLUTTER_CALLBACK (layer_reposition_cb), view); + return FALSE; } static void