Lines Matching refs:tp
73 tp_touch_get_edge(const struct tp_dispatch *tp, const struct tp_touch *t)
77 if (tp->scroll.method != LIBINPUT_CONFIG_SCROLL_EDGE)
80 if (t->point.x > tp->scroll.right_edge)
83 if (t->point.y > tp->scroll.bottom_edge)
90 tp_edge_scroll_set_timer(struct tp_dispatch *tp,
99 if (tp->buttons.click_method ==
108 tp_edge_scroll_set_state(struct tp_dispatch *tp,
122 t->scroll.edge = tp_touch_get_edge(tp, t);
124 tp_edge_scroll_set_timer(tp, t, time);
135 tp_edge_scroll_handle_none(struct tp_dispatch *tp,
142 if (tp_touch_get_edge(tp, t)) {
143 tp_edge_scroll_set_state(tp,
148 tp_edge_scroll_set_state(tp,
158 evdev_log_bug_libinput(tp->device,
167 tp_edge_scroll_handle_edge_new(struct tp_dispatch *tp,
174 evdev_log_bug_libinput(tp->device,
180 t->scroll.edge &= tp_touch_get_edge(tp, t);
182 tp_edge_scroll_set_state(tp,
188 tp_edge_scroll_set_state(tp,
195 tp_edge_scroll_set_state(tp,
204 tp_edge_scroll_handle_edge(struct tp_dispatch *tp,
212 evdev_log_bug_libinput(tp->device,
220 t->scroll.edge &= tp_touch_get_edge(tp, t);
222 tp_edge_scroll_set_state(tp,
229 tp_edge_scroll_set_state(tp,
240 tp_edge_scroll_handle_area(struct tp_dispatch *tp,
249 evdev_log_bug_libinput(tp->device,
256 tp_edge_scroll_set_state(tp,
265 tp_edge_scroll_handle_event(struct tp_dispatch *tp,
274 tp_edge_scroll_handle_none(tp, t, event, time);
277 tp_edge_scroll_handle_edge_new(tp, t, event, time);
280 tp_edge_scroll_handle_edge(tp, t, event, time);
283 tp_edge_scroll_handle_area(tp, t, event, time);
288 evdev_log_debug(tp->device,
301 tp_edge_scroll_handle_event(t->tp, t, SCROLL_EVENT_TIMEOUT, now);
305 tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device)
321 if (!tp->buttons.is_clickpad)
329 tp->scroll.right_edge = edges.x;
331 tp->scroll.bottom_edge = edges.y;
333 tp->scroll.bottom_edge = INT_MAX;
336 tp_for_each_touch(tp, t) {
346 tp_libinput_context(tp),
353 tp_remove_edge_scroll(struct tp_dispatch *tp)
357 tp_for_each_touch(tp, t) {
364 tp_edge_scroll_handle_state(struct tp_dispatch *tp, uint64_t time)
368 if (tp->scroll.method != LIBINPUT_CONFIG_SCROLL_EDGE) {
369 tp_for_each_touch(tp, t) {
380 tp_for_each_touch(tp, t) {
389 tp_edge_scroll_handle_event(tp,
395 tp_edge_scroll_handle_event(tp,
403 evdev_log_debug(tp->device,
409 tp_edge_scroll_handle_event(tp,
419 tp_edge_scroll_post_events(struct tp_dispatch *tp, uint64_t time)
421 struct evdev_device *device = tp->device;
430 tp_for_each_touch(tp, t) {
434 if (t->palm.state != PALM_NONE || tp_thumb_ignored(tp, t))
439 (tp_touch_get_edge(tp, t) & t->scroll.edge) == 0)
469 normalized = tp_filter_motion_unaccelerated(tp, &fraw, time);
480 normalized = tp_normalize_delta(tp,
500 tp_edge_scroll_handle_event(tp, t, SCROLL_EVENT_POSTED, time);
507 tp_edge_scroll_stop_events(struct tp_dispatch *tp, uint64_t time)
509 struct evdev_device *device = tp->device;
513 tp_for_each_touch(tp, t) {
529 tp_edge_scroll_touch_active(const struct tp_dispatch *tp,