From 0dea846096d9fbf38d83946003a2d6f29542d276 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 17 Jun 2011 16:52:25 +0100 Subject: [PATCH] drag-action: Use the dragged actor private API Use the newly added private API on ClutterStage to track the currently dragged actor. https://bugzilla.gnome.org/show_bug.cgi?id=652842 --- clutter/clutter-drag-action.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c index d58054020..e207c2f77 100644 --- a/clutter/clutter-drag-action.c +++ b/clutter/clutter-drag-action.c @@ -164,7 +164,14 @@ emit_drag_begin (ClutterDragAction *action, ClutterDragActionPrivate *priv = action->priv; if (priv->stage != NULL) - clutter_stage_set_motion_events_enabled (priv->stage, FALSE); + { + clutter_stage_set_motion_events_enabled (priv->stage, FALSE); + _clutter_stage_add_drag_actor (priv->stage, + clutter_event_get_device (event), + priv->drag_handle != NULL + ? priv->drag_handle + : actor); + } g_signal_emit (action, drag_signals[DRAG_BEGIN], 0, actor, @@ -264,6 +271,8 @@ emit_drag_end (ClutterDragAction *action, clutter_stage_set_motion_events_enabled (priv->stage, priv->motion_events_enabled); + _clutter_stage_remove_drag_actor (priv->stage, + clutter_event_get_device (event)); priv->in_drag = FALSE; }