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
This commit is contained in:
Emmanuele Bassi 2011-06-17 16:52:25 +01:00
parent 530a13f02f
commit 0dea846096

View File

@ -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_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;
}