| 294 | } |
| 295 | |
| 296 | void wf::pointer_t::send_motion(uint32_t time_msec) |
| 297 | { |
| 298 | if (cursor_focus) |
| 299 | { |
| 300 | auto gc = wf::get_core().get_cursor_position(); |
| 301 | auto local = get_node_local_coords(cursor_focus.get(), gc); |
| 302 | |
| 303 | if (!last_focus_coords.has_value() || |
| 304 | (local.x != last_focus_coords->x) || (local.y != last_focus_coords->y)) |
| 305 | { |
| 306 | // NB: the pointer motion could go to a grab, which could trigger scenegraph changes, which |
| 307 | // trigger re-focus. We need to set the last focus coordinates early, so that we break out of |
| 308 | // infinite loops. |
| 309 | last_focus_coords = local; |
| 310 | cursor_focus->pointer_interaction().handle_pointer_motion(local, time_msec); |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | void wf::pointer_t::handle_pointer_motion(wlr_pointer_motion_event *ev, |
| 316 | input_event_processing_mode_t mode) |
no test coverage detected