[libchamplain] Fix touch gesture zoom



commit b76777f31ce4a1a550aebac6e18b3371a81d6cb4
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Thu Mar 30 19:05:06 2017 +0200

    Fix touch gesture zoom
    
    Check the source device instead of the master to differentiate between pointer and touch device.

 champlain/champlain-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 709e029..784d644 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1455,7 +1455,8 @@ zoom_gesture_begin_cb (ClutterGestureAction *gesture,
     G_GNUC_UNUSED ClutterActor *actor,
     G_GNUC_UNUSED gpointer user_data)
 {
-  ClutterInputDevice *device = clutter_gesture_action_get_device (gesture, 0);
+  ClutterEvent *event = clutter_gesture_action_get_last_event (gesture, 0);
+  ClutterInputDevice *device = clutter_event_get_source_device (event);
 
   /* Give up on >2 finger input and when using mouse */
   return clutter_gesture_action_get_n_current_points (gesture) == 2 &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]