drag-action: Re-use press_button in emit_drag_end()

Since emit_drag_end() can be called from a MOTION event capture we
cannot call clutter_event_get_button(). We should, instead, use the
press_button value because if we're emitting ::drag-end it means we
also emitted ::drag-begin and the value is valid.
This commit is contained in:
Emmanuele Bassi 2010-05-27 12:30:22 +01:00
parent 346ebce573
commit b77c0c91d7

View File

@ -212,7 +212,7 @@ emit_drag_end (ClutterDragAction *action,
g_signal_emit (action, drag_signals[DRAG_END], 0,
actor,
priv->last_motion_x, priv->last_motion_y,
clutter_event_get_button (event),
priv->press_button,
clutter_event_get_state (event));
/* disconnect the capture */