| 69 | } |
| 70 | |
| 71 | void wf::pointer_t::update_cursor_position(int64_t time_msec) |
| 72 | { |
| 73 | wf::pointf_t gc = seat->priv->cursor->get_cursor_position(); |
| 74 | |
| 75 | /* If we have a grabbed surface, but no drag, we want to continue sending |
| 76 | * events to the grabbed surface, even if the pointer goes outside of it. |
| 77 | * This enables Xwayland DnD to work correctly, and also lets the user for |
| 78 | * ex. grab a scrollbar and move their mouse freely. */ |
| 79 | if (!grabbed_node && this->focus_enabled()) |
| 80 | { |
| 81 | const auto& scene = wf::get_core().scene(); |
| 82 | auto isec = scene->find_node_at(gc); |
| 83 | update_cursor_focus(isec ? isec->node->shared_from_this() : nullptr); |
| 84 | } |
| 85 | |
| 86 | this->send_motion(time_msec); |
| 87 | seat->priv->update_drag_icon(); |
| 88 | } |
| 89 | |
| 90 | void wf::pointer_t::send_leave_to_focus(wf::scene::node_ptr old_focus) |
| 91 | { |
no test coverage detected