diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-03-11 11:30:02 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-03-17 09:02:47 +1000 |
commit | 1df0208f4f6d62927be7cf119854b412a8b7a95b (patch) | |
tree | 415b64576a07fadcf742c8d7962bb373a82b3644 /src/evdev-mt-touchpad-edge-scroll.c | |
parent | 1b70842f9e277525f3aca12b9f8b535502312e5b (diff) | |
download | libinput-1df0208f4f6d62927be7cf119854b412a8b7a95b.tar.gz |
Add another data type for discrete coordinates
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/evdev-mt-touchpad-edge-scroll.c')
-rw-r--r-- | src/evdev-mt-touchpad-edge-scroll.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/evdev-mt-touchpad-edge-scroll.c b/src/evdev-mt-touchpad-edge-scroll.c index d33f4fd9..6e248196 100644 --- a/src/evdev-mt-touchpad-edge-scroll.c +++ b/src/evdev-mt-touchpad-edge-scroll.c @@ -315,6 +315,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) double initial_dx, initial_dy, *initial_delta; struct normalized_coords normalized; const struct normalized_coords zero = { 0.0, 0.0 }; + const struct discrete_coords zero_discrete = { 0.0, 0.0 }; if (tp->scroll.method != LIBINPUT_CONFIG_SCROLL_EDGE) return 0; @@ -331,7 +332,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) AS_MASK(t->scroll.direction), LIBINPUT_POINTER_AXIS_SOURCE_FINGER, &zero, - 0, 0); + &zero_discrete); t->scroll.direction = -1; } continue; @@ -383,7 +384,7 @@ tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time) AS_MASK(axis), LIBINPUT_POINTER_AXIS_SOURCE_FINGER, &normalized, - 0, 0); + &zero_discrete); t->scroll.direction = axis; tp_edge_scroll_handle_event(tp, t, SCROLL_EVENT_POSTED); @@ -398,6 +399,7 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time) struct libinput_device *device = &tp->device->base; struct tp_touch *t; const struct normalized_coords zero = { 0.0, 0.0 }; + const struct discrete_coords zero_discrete = { 0.0, 0.0 }; tp_for_each_touch(tp, t) { if (t->scroll.direction != -1) { @@ -405,7 +407,7 @@ tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time) AS_MASK(t->scroll.direction), LIBINPUT_POINTER_AXIS_SOURCE_FINGER, &zero, - 0.0, 0.0); + &zero_discrete); t->scroll.direction = -1; } } |