[clutter] drag-action: Use the dragged actor private API
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] drag-action: Use the dragged actor private API
- Date: Mon, 20 Jun 2011 14:40:26 +0000 (UTC)
commit 0dea846096d9fbf38d83946003a2d6f29542d276
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Jun 17 16:52:25 2011 +0100
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 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c
index d580540..e207c2f 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]