From b77c0c91d76f56f9c9c032ccec5c04c0ab37aeae Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 27 May 2010 12:30:22 +0100 Subject: [PATCH] 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. --- clutter/clutter-drag-action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-drag-action.c b/clutter/clutter-drag-action.c index b5973b219..ddba5aad4 100644 --- a/clutter/clutter-drag-action.c +++ b/clutter/clutter-drag-action.c @@ -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 */