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

Method update_cursor_position

src/core/seat/pointer.cpp:71–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void 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
90void wf::pointer_t::send_leave_to_focus(wf::scene::node_ptr old_focus)
91{

Callers 1

warp_cursorMethod · 0.80

Calls 6

focus_enabledMethod · 0.95
send_motionMethod · 0.95
shared_from_thisMethod · 0.80
update_drag_iconMethod · 0.80
get_cursor_positionMethod · 0.45
find_node_atMethod · 0.45

Tested by

no test coverage detected