drag-action: fix case where motion events are indefinitely disabled
When drag threshold is not reached, emit_drag_begin() is not called causing default value of priv->motion_events_enabled (false) to used to restore motion events enabled state in Clutter. This causes drag action to indefinitely disable motion events. The current value of motion events enabled state is now queried on button press which guarantees that the state will be restored with the correct value in emit_drag_end() http://bugzilla.clutter-project.org/show_bug.cgi?id=2522
This commit is contained in:
parent
cecc7a4bfb
commit
c61e22d067
@ -134,7 +134,6 @@ emit_drag_begin (ClutterDragAction *action,
|
||||
{
|
||||
ClutterDragActionPrivate *priv = action->priv;
|
||||
|
||||
priv->motion_events_enabled = clutter_get_motion_events_enabled ();
|
||||
clutter_set_motion_events_enabled (FALSE);
|
||||
|
||||
g_signal_emit (action, drag_signals[DRAG_BEGIN], 0,
|
||||
@ -310,6 +309,8 @@ on_button_press (ClutterActor *actor,
|
||||
&priv->transformed_press_x,
|
||||
&priv->transformed_press_y);
|
||||
|
||||
priv->motion_events_enabled = clutter_get_motion_events_enabled ();
|
||||
|
||||
if (priv->x_drag_threshold == 0 || priv->y_drag_threshold == 0)
|
||||
emit_drag_begin (action, actor, event);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user