From 48d82ed3ea99c4ec4660142f76e3fc8d9b83dc55 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 Jun 2016 11:05:12 +1000 Subject: touchpad: use the tp_libinput_context() helper Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-gestures.c | 6 +++--- src/evdev-mt-touchpad.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c index 2a804e73..a8ff37ed 100644 --- a/src/evdev-mt-touchpad-gestures.c +++ b/src/evdev-mt-touchpad-gestures.c @@ -93,7 +93,7 @@ tp_get_average_touches_delta(struct tp_dispatch *tp) static void tp_gesture_start(struct tp_dispatch *tp, uint64_t time) { - struct libinput *libinput = tp->device->base.seat->libinput; + struct libinput *libinput = tp_libinput_context(tp); const struct normalized_coords zero = { 0.0, 0.0 }; if (tp->gesture.started) @@ -525,7 +525,7 @@ tp_gesture_stop_twofinger_scroll(struct tp_dispatch *tp, uint64_t time) static void tp_gesture_end(struct tp_dispatch *tp, uint64_t time, bool cancelled) { - struct libinput *libinput = tp->device->base.seat->libinput; + struct libinput *libinput = tp_libinput_context(tp); enum tp_gesture_state state = tp->gesture.state; tp->gesture.state = GESTURE_STATE_NONE; @@ -628,7 +628,7 @@ tp_init_gesture(struct tp_dispatch *tp) tp->gesture.state = GESTURE_STATE_NONE; libinput_timer_init(&tp->gesture.finger_count_switch_timer, - tp->device->base.seat->libinput, + tp_libinput_context(tp), tp_gesture_finger_count_switch_timeout, tp); return 0; } diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 724de7f8..56760dcf 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -131,7 +131,7 @@ tp_fake_finger_count(struct tp_dispatch *tp) * time */ if (__builtin_popcount( tp->fake_touches & ~(FAKE_FINGER_OVERFLOW|0x1)) > 1) - log_bug_kernel(tp->device->base.seat->libinput, + log_bug_kernel(tp_libinput_context(tp), "Invalid fake finger state %#x\n", tp->fake_touches); -- cgit v1.2.3