diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-08-25 22:53:58 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-08-25 22:53:58 -0400 |
commit | 3390ccb0959d75da2157c589207a3be0cd2e2173 (patch) | |
tree | 8601a1d3fc30101b5470d82e27d0ec2b07dd066b | |
parent | a2cc57d0747a58f9bd6a5e4fde5cf7c1c4d6f4c9 (diff) | |
download | gtk+-3390ccb0959d75da2157c589207a3be0cd2e2173.tar.gz |
gesture rotate: Partially convert to GdkEvent API
-rw-r--r-- | gtk/gtkgesturerotate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c index a04fdd5613..e91a57c5ff 100644 --- a/gtk/gtkgesturerotate.c +++ b/gtk/gtkgesturerotate.c @@ -83,6 +83,7 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate, GtkGesture *gesture; gdouble dx, dy; GList *sequences; + GdkTouchpadGesturePhase phase; gesture = GTK_GESTURE (rotate); priv = gtk_gesture_rotate_get_instance_private (rotate); @@ -96,10 +97,12 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate, last_event = gtk_gesture_get_last_event (gesture, sequences->data); + gdk_event_get_touchpad_gesture_phase (last_event, &phase); + if (gdk_event_get_event_type (last_event) == GDK_TOUCHPAD_PINCH && - (last_event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN || - last_event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE || - last_event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_END)) + (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN || + phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE || + phase == GDK_TOUCHPAD_GESTURE_PHASE_END)) { *angle = priv->accum_touchpad_angle; } |