Commit 7cbd35dd authored by Matthias Clasen's avatar Matthias Clasen Committed by Carlos Garnacho
Browse files

gesture rotate: Partially convert to GdkEvent API

parent d20efc15
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment