| 321 | } |
| 322 | |
| 323 | void 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 | |
| 343 | void wf::pointer_t::handle_pointer_axis(wlr_pointer_axis_event *ev, |
| 344 | input_event_processing_mode_t mode) |
nothing calls this directly
no outgoing calls
no test coverage detected