mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
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:
parent
530a13f02f
commit
0dea846096
@ -164,7 +164,14 @@ emit_drag_begin (ClutterDragAction *action,
|
|||||||
ClutterDragActionPrivate *priv = action->priv;
|
ClutterDragActionPrivate *priv = action->priv;
|
||||||
|
|
||||||
if (priv->stage != NULL)
|
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,
|
g_signal_emit (action, drag_signals[DRAG_BEGIN], 0,
|
||||||
actor,
|
actor,
|
||||||
@ -264,6 +271,8 @@ emit_drag_end (ClutterDragAction *action,
|
|||||||
|
|
||||||
clutter_stage_set_motion_events_enabled (priv->stage,
|
clutter_stage_set_motion_events_enabled (priv->stage,
|
||||||
priv->motion_events_enabled);
|
priv->motion_events_enabled);
|
||||||
|
_clutter_stage_remove_drag_actor (priv->stage,
|
||||||
|
clutter_event_get_device (event));
|
||||||
|
|
||||||
priv->in_drag = FALSE;
|
priv->in_drag = FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user