summaryrefslogtreecommitdiff
path: root/gtk/gtkgesturerotate.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-08-25 16:47:11 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-09-19 18:39:02 +0200
commit7545b908dede007c663eefbd52cdbc7131bf7628 (patch)
tree1baa52a585b91f728a1085f82588a911b43655fc /gtk/gtkgesturerotate.c
parent67239f112e95ea238ce172ac3a71ec7425a0b28f (diff)
downloadgtk+-7545b908dede007c663eefbd52cdbc7131bf7628.tar.gz
gesture: Update to using GdkEvent API
To some extent, pad and touchpad gesture events need extra API.
Diffstat (limited to 'gtk/gtkgesturerotate.c')
-rw-r--r--gtk/gtkgesturerotate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkgesturerotate.c b/gtk/gtkgesturerotate.c
index 7a1286e961..a04fdd5613 100644
--- a/gtk/gtkgesturerotate.c
+++ b/gtk/gtkgesturerotate.c
@@ -96,7 +96,7 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate,
last_event = gtk_gesture_get_last_event (gesture, sequences->data);
- if (last_event->type == GDK_TOUCHPAD_PINCH &&
+ 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))
@@ -169,7 +169,7 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller,
const GdkEvent *event)
{
/* Let 2-finger touchpad pinch events go through */
- if (event->type == GDK_TOUCHPAD_PINCH)
+ if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
{
if (event->touchpad_pinch.n_fingers == 2)
return FALSE;
@@ -189,7 +189,7 @@ gtk_gesture_rotate_handle_event (GtkEventController *controller,
priv = gtk_gesture_rotate_get_instance_private (rotate);
- if (event->type == GDK_TOUCHPAD_PINCH)
+ if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
{
if (event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN ||
event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_END)