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

Method handle_pointer_motion_absolute

src/core/seat/pointer.cpp:323–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void wf::pointer_t::handle_pointer_motion_absolute(
324 wlr_pointer_motion_absolute_event *ev, input_event_processing_mode_t mode)
325{
326 // next coordinates
327 double cx, cy;
328 wlr_cursor_absolute_to_layout_coords(seat->priv->cursor->cursor, &ev->pointer->base,
329 ev->x, ev->y, &cx, &cy);
330
331 // send relative motion
332 double dx = cx - seat->priv->cursor->cursor->x;
333 double dy = cy - seat->priv->cursor->cursor->y;
334 wlr_relative_pointer_manager_v1_send_relative_motion(
335 wf::get_core().protocols.relative_pointer, seat->seat,
336 (uint64_t)ev->time_msec * 1000, dx, dy, dx, dy);
337
338 // TODO: indirection via wf_cursor
339 wlr_cursor_warp_closest(seat->priv->cursor->cursor, NULL, cx, cy);
340 update_cursor_position(ev->time_msec);
341}
342
343void wf::pointer_t::handle_pointer_axis(wlr_pointer_axis_event *ev,
344 input_event_processing_mode_t mode)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected