diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-09-15 13:20:16 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-09-19 18:39:03 +0200 |
commit | d271b135bbe92036ff8d63113005c9bc5edfccf5 (patch) | |
tree | 123e84d25ecba50b1af789e838e2d0dd831adf44 /gdk/wayland/gdkdevice-wayland.c | |
parent | f2ded6a68558c2d7db05ffe532bb217bd2a5a9b5 (diff) | |
download | gtk+-d271b135bbe92036ff8d63113005c9bc5edfccf5.tar.gz |
gdk/wayland: Drop emission of emulated scroll events
A wl_pointer.frame can now only result on one scroll event
being emitted.
Diffstat (limited to 'gdk/wayland/gdkdevice-wayland.c')
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 1bc142a20e..61a4d50f06 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -1387,10 +1387,9 @@ flush_scroll_event (GdkWaylandSeat *seat, pointer_frame->discrete_x = 0; pointer_frame->discrete_y = 0; } - - if (pointer_frame->is_scroll_stop || - pointer_frame->delta_x != 0 || - pointer_frame->delta_y != 0) + else if (pointer_frame->is_scroll_stop || + pointer_frame->delta_x != 0 || + pointer_frame->delta_y != 0) { /* Axes can stop independently, if we stop on one axis but have a * delta on the other, we don't count it as a stop event. @@ -1404,11 +1403,13 @@ flush_scroll_event (GdkWaylandSeat *seat, pointer_frame->delta_x, pointer_frame->delta_y, is_stop); - - pointer_frame->delta_x = 0; - pointer_frame->delta_y = 0; - pointer_frame->is_scroll_stop = FALSE; } + + pointer_frame->discrete_x = 0; + pointer_frame->discrete_y = 0; + pointer_frame->delta_x = 0; + pointer_frame->delta_y = 0; + pointer_frame->is_scroll_stop = FALSE; } static void |