MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / handle_pointer_axis

Method handle_pointer_axis

src/core/seat/pointer.cpp:343–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void wf::pointer_t::handle_pointer_axis(wlr_pointer_axis_event *ev,
344 input_event_processing_mode_t mode)
345{
346 bool handled_in_binding = wf::get_core().bindings->handle_axis(
347 seat->priv->get_modifiers(), ev);
348 seat->priv->break_mod_bindings();
349
350 /* Do not send scroll events to clients if an axis binding has used up the
351 * event */
352 if (handled_in_binding)
353 {
354 return;
355 }
356
357 /* Calculate speed settings */
358 wf::pointing_device_t *pd = (wf::pointing_device_t*)ev->pointer->base.data;
359 double mult = pd->get_scroll_speed(&ev->pointer->base, ev->source == WL_POINTER_AXIS_SOURCE_FINGER);
360
361 ev->delta *= mult;
362 ev->delta_discrete *= mult;
363
364 if (cursor_focus)
365 {
366 cursor_focus->pointer_interaction().handle_pointer_axis(*ev);
367 }
368}
369
370void wf::pointer_t::handle_pointer_swipe_begin(wlr_pointer_swipe_begin_event *ev,
371 input_event_processing_mode_t mode)

Callers

nothing calls this directly

Calls 4

break_mod_bindingsMethod · 0.80
get_scroll_speedMethod · 0.80
handle_axisMethod · 0.45
get_modifiersMethod · 0.45

Tested by

no test coverage detected