summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-06-09 11:05:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-06-10 06:57:41 +1000
commit48d82ed3ea99c4ec4660142f76e3fc8d9b83dc55 (patch)
tree354d3c866c4c13fd49d6903a6f4525cd6ca17787 /src
parentc781ef2eb366154d651f00e9a6107eff609b2afb (diff)
touchpad: use the tp_libinput_context() helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev-mt-touchpad-gestures.c6
-rw-r--r--src/evdev-mt-touchpad.c2
2 files changed, 4 insertions, 4 deletions
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);