diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-03-10 11:10:36 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-03-10 11:36:36 -0400 |
commit | d6b6b363adcd9c9c74c8cb2f74c7d96d404bbc7b (patch) | |
tree | 789f56a9e7d3e65d4825fcda3ffdcc3fae2a588e | |
parent | 254e2e993c923ea1d2be4d946233d23b01127718 (diff) | |
download | mutter-d6b6b363adcd9c9c74c8cb2f74c7d96d404bbc7b.tar.gz |
seat: Add support for smooth scrolling
-rw-r--r-- | src/wayland/meta-wayland-seat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c index 47c1d5f6d..2f4658727 100644 --- a/src/wayland/meta-wayland-seat.c +++ b/src/wayland/meta-wayland-seat.c @@ -283,6 +283,9 @@ handle_scroll_event (MetaWaylandSeat *seat, if (!seat->pointer.focus_resource) return; + if (clutter_event_is_pointer_emulated (event)) + return; + switch (clutter_event_get_scroll_direction (event)) { case CLUTTER_SCROLL_UP: @@ -301,6 +304,15 @@ handle_scroll_event (MetaWaylandSeat *seat, x_value = DEFAULT_AXIS_STEP_DISTANCE; break; + case CLUTTER_SCROLL_SMOOTH: + { + double dx, dy; + clutter_event_get_scroll_delta (event, &dx, &dy); + x_value = wl_fixed_from_double (dx); + y_value = wl_fixed_from_double (dy); + } + break; + default: return; } |