• Home
  • Raw
  • Download

Lines Matching full:dispatch

67 log_wheel_bug(struct fallback_dispatch *dispatch, enum wheel_event event)  in log_wheel_bug()  argument
69 evdev_log_bug_libinput(dispatch->device, in log_wheel_bug()
72 wheel_state_to_str(dispatch->wheel.state)); in log_wheel_bug()
76 wheel_set_scroll_timer(struct fallback_dispatch *dispatch, uint64_t time) in wheel_set_scroll_timer() argument
78 libinput_timer_set(&dispatch->wheel.scroll_timer, in wheel_set_scroll_timer()
83 wheel_cancel_scroll_timer(struct fallback_dispatch *dispatch) in wheel_cancel_scroll_timer() argument
85 libinput_timer_cancel(&dispatch->wheel.scroll_timer); in wheel_cancel_scroll_timer()
89 wheel_handle_event_on_state_none(struct fallback_dispatch *dispatch, in wheel_handle_event_on_state_none() argument
95 dispatch->wheel.state = WHEEL_STATE_ACCUMULATING_SCROLL; in wheel_handle_event_on_state_none()
101 log_wheel_bug(dispatch, event); in wheel_handle_event_on_state_none()
107 wheel_handle_event_on_state_accumulating_scroll(struct fallback_dispatch *dispatch, in wheel_handle_event_on_state_accumulating_scroll() argument
113 dispatch->wheel.state = WHEEL_STATE_SCROLLING; in wheel_handle_event_on_state_accumulating_scroll()
114 wheel_set_scroll_timer(dispatch, time); in wheel_handle_event_on_state_accumulating_scroll()
120 dispatch->wheel.state = WHEEL_STATE_NONE; in wheel_handle_event_on_state_accumulating_scroll()
123 log_wheel_bug(dispatch, event); in wheel_handle_event_on_state_accumulating_scroll()
129 wheel_handle_event_on_state_scrolling(struct fallback_dispatch *dispatch, in wheel_handle_event_on_state_scrolling() argument
135 wheel_cancel_scroll_timer(dispatch); in wheel_handle_event_on_state_scrolling()
136 wheel_set_scroll_timer(dispatch, time); in wheel_handle_event_on_state_scrolling()
139 dispatch->wheel.state = WHEEL_STATE_NONE; in wheel_handle_event_on_state_scrolling()
142 wheel_cancel_scroll_timer(dispatch); in wheel_handle_event_on_state_scrolling()
143 dispatch->wheel.state = WHEEL_STATE_NONE; in wheel_handle_event_on_state_scrolling()
146 log_wheel_bug(dispatch, event); in wheel_handle_event_on_state_scrolling()
152 wheel_handle_event(struct fallback_dispatch *dispatch, in wheel_handle_event() argument
156 enum wheel_state oldstate = dispatch->wheel.state; in wheel_handle_event()
160 wheel_handle_event_on_state_none(dispatch, event, time); in wheel_handle_event()
163 wheel_handle_event_on_state_accumulating_scroll(dispatch, in wheel_handle_event()
168 wheel_handle_event_on_state_scrolling(dispatch, event, time); in wheel_handle_event()
172 if (oldstate != dispatch->wheel.state) { in wheel_handle_event()
173 evdev_log_debug(dispatch->device, in wheel_handle_event()
177 wheel_state_to_str(dispatch->wheel.state)); in wheel_handle_event()
182 wheel_flush_scroll(struct fallback_dispatch *dispatch, in wheel_flush_scroll() argument
195 .x = dispatch->wheel.lo_res.x, in wheel_flush_scroll()
196 .y = dispatch->wheel.lo_res.y * -1, in wheel_flush_scroll()
207 dispatch->wheel.hi_res.x = 0; in wheel_flush_scroll()
208 dispatch->wheel.hi_res.y = 0; in wheel_flush_scroll()
209 dispatch->wheel.lo_res.x = 0; in wheel_flush_scroll()
210 dispatch->wheel.lo_res.y = 0; in wheel_flush_scroll()
215 if (dispatch->wheel.hi_res.y != 0) { in wheel_flush_scroll()
216 int value = dispatch->wheel.hi_res.y; in wheel_flush_scroll()
226 dispatch->wheel.hi_res.y = 0; in wheel_flush_scroll()
229 if (dispatch->wheel.lo_res.y != 0) { in wheel_flush_scroll()
230 int value = dispatch->wheel.lo_res.y; in wheel_flush_scroll()
240 dispatch->wheel.lo_res.y = 0; in wheel_flush_scroll()
243 if (dispatch->wheel.hi_res.x != 0) { in wheel_flush_scroll()
244 int value = dispatch->wheel.hi_res.x; in wheel_flush_scroll()
254 dispatch->wheel.hi_res.x = 0; in wheel_flush_scroll()
257 if (dispatch->wheel.lo_res.x != 0) { in wheel_flush_scroll()
258 int value = dispatch->wheel.lo_res.x; in wheel_flush_scroll()
268 dispatch->wheel.lo_res.x = 0; in wheel_flush_scroll()
273 wheel_handle_state_none(struct fallback_dispatch *dispatch, in wheel_handle_state_none() argument
281 wheel_handle_state_accumulating_scroll(struct fallback_dispatch *dispatch, in wheel_handle_state_accumulating_scroll() argument
285 if (abs(dispatch->wheel.hi_res.x) >= ACC_V120_THRESHOLD || in wheel_handle_state_accumulating_scroll()
286 abs(dispatch->wheel.hi_res.y) >= ACC_V120_THRESHOLD) { in wheel_handle_state_accumulating_scroll()
287 wheel_handle_event(dispatch, in wheel_handle_state_accumulating_scroll()
290 wheel_flush_scroll(dispatch, device, time); in wheel_handle_state_accumulating_scroll()
295 wheel_handle_state_scrolling(struct fallback_dispatch *dispatch, in wheel_handle_state_scrolling() argument
299 wheel_flush_scroll(dispatch, device, time); in wheel_handle_state_scrolling()
303 wheel_handle_direction_change(struct fallback_dispatch *dispatch, in wheel_handle_direction_change() argument
318 if (new_dir != WHEEL_DIR_UNKNOW && new_dir != dispatch->wheel.dir) { in wheel_handle_direction_change()
319 dispatch->wheel.dir = new_dir; in wheel_handle_direction_change()
320 wheel_handle_event(dispatch, in wheel_handle_direction_change()
327 fallback_rotate_wheel(struct fallback_dispatch *dispatch, in fallback_rotate_wheel() argument
335 if (dispatch->rotation.angle >= 160.0 && in fallback_rotate_wheel()
336 dispatch->rotation.angle <= 220.0) { in fallback_rotate_wheel()
342 fallback_wheel_process_relative(struct fallback_dispatch *dispatch, in fallback_wheel_process_relative() argument
348 fallback_rotate_wheel(dispatch, device, e); in fallback_wheel_process_relative()
349 dispatch->wheel.lo_res.y += e->value; in fallback_wheel_process_relative()
350 if (dispatch->wheel.emulate_hi_res_wheel) in fallback_wheel_process_relative()
351 dispatch->wheel.hi_res.y += e->value * 120; in fallback_wheel_process_relative()
352 dispatch->pending_event |= EVDEV_WHEEL; in fallback_wheel_process_relative()
353 wheel_handle_event(dispatch, WHEEL_EVENT_SCROLL, time); in fallback_wheel_process_relative()
356 fallback_rotate_wheel(dispatch, device, e); in fallback_wheel_process_relative()
357 dispatch->wheel.lo_res.x += e->value; in fallback_wheel_process_relative()
358 if (dispatch->wheel.emulate_hi_res_wheel) in fallback_wheel_process_relative()
359 dispatch->wheel.hi_res.x += e->value * 120; in fallback_wheel_process_relative()
360 dispatch->pending_event |= EVDEV_WHEEL; in fallback_wheel_process_relative()
361 wheel_handle_event(dispatch, WHEEL_EVENT_SCROLL, time); in fallback_wheel_process_relative()
364 fallback_rotate_wheel(dispatch, device, e); in fallback_wheel_process_relative()
365 dispatch->wheel.hi_res.y += e->value; in fallback_wheel_process_relative()
366 dispatch->wheel.hi_res_event_received = true; in fallback_wheel_process_relative()
367 dispatch->pending_event |= EVDEV_WHEEL; in fallback_wheel_process_relative()
368 wheel_handle_direction_change(dispatch, e, time); in fallback_wheel_process_relative()
369 wheel_handle_event(dispatch, WHEEL_EVENT_SCROLL, time); in fallback_wheel_process_relative()
372 fallback_rotate_wheel(dispatch, device, e); in fallback_wheel_process_relative()
373 dispatch->wheel.hi_res.x += e->value; in fallback_wheel_process_relative()
374 dispatch->wheel.hi_res_event_received = true; in fallback_wheel_process_relative()
375 dispatch->pending_event |= EVDEV_WHEEL; in fallback_wheel_process_relative()
376 wheel_handle_direction_change(dispatch, e, time); in fallback_wheel_process_relative()
377 wheel_handle_event(dispatch, WHEEL_EVENT_SCROLL, time); in fallback_wheel_process_relative()
383 fallback_wheel_handle_state(struct fallback_dispatch *dispatch, in fallback_wheel_handle_state() argument
390 if (!dispatch->wheel.emulate_hi_res_wheel && in fallback_wheel_handle_state()
391 !dispatch->wheel.hi_res_event_received && in fallback_wheel_handle_state()
392 (dispatch->wheel.lo_res.x != 0 || dispatch->wheel.lo_res.y != 0)) { in fallback_wheel_handle_state()
397 dispatch->wheel.emulate_hi_res_wheel = true; in fallback_wheel_handle_state()
398 dispatch->wheel.hi_res.x = dispatch->wheel.lo_res.x * 120; in fallback_wheel_handle_state()
399 dispatch->wheel.hi_res.y = dispatch->wheel.lo_res.y * 120; in fallback_wheel_handle_state()
402 switch (dispatch->wheel.state) { in fallback_wheel_handle_state()
404 wheel_handle_state_none(dispatch, device, time); in fallback_wheel_handle_state()
407 wheel_handle_state_accumulating_scroll(dispatch, device, time); in fallback_wheel_handle_state()
410 wheel_handle_state_scrolling(dispatch, device, time); in fallback_wheel_handle_state()
419 struct fallback_dispatch *dispatch = in wheel_init_scroll_timer() local
420 fallback_dispatch(device->dispatch); in wheel_init_scroll_timer()
422 wheel_handle_event(dispatch, WHEEL_EVENT_SCROLL_TIMEOUT, now); in wheel_init_scroll_timer()
426 fallback_init_wheel(struct fallback_dispatch *dispatch, in fallback_init_wheel() argument
431 dispatch->wheel.state = WHEEL_STATE_NONE; in fallback_init_wheel()
432 dispatch->wheel.dir = WHEEL_DIR_UNKNOW; in fallback_init_wheel()
448 dispatch->wheel.emulate_hi_res_wheel = true; in fallback_init_wheel()
454 libinput_timer_init(&dispatch->wheel.scroll_timer, in fallback_init_wheel()