mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
wayland: Replace cursor renderer usage with cursor tracker
We just want to know the pointer position, let's use something else here. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
e721fde259
commit
d41dbf92ea
@ -74,16 +74,14 @@ static MetaLogicalMonitor *
|
|||||||
dnd_surface_find_logical_monitor (MetaWaylandActorSurface *actor_surface)
|
dnd_surface_find_logical_monitor (MetaWaylandActorSurface *actor_surface)
|
||||||
{
|
{
|
||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
MetaCursorRenderer *cursor_renderer =
|
MetaCursorTracker *cursor_tracker =
|
||||||
meta_backend_get_cursor_renderer (backend);
|
meta_backend_get_cursor_tracker (backend);
|
||||||
MetaMonitorManager *monitor_manager =
|
MetaMonitorManager *monitor_manager =
|
||||||
meta_backend_get_monitor_manager (backend);
|
meta_backend_get_monitor_manager (backend);
|
||||||
graphene_point_t pointer_pos;
|
int x, y;
|
||||||
|
|
||||||
pointer_pos = meta_cursor_renderer_get_position (cursor_renderer);
|
meta_cursor_tracker_get_pointer (cursor_tracker, &x, &y, NULL);
|
||||||
return meta_monitor_manager_get_logical_monitor_at (monitor_manager,
|
return meta_monitor_manager_get_logical_monitor_at (monitor_manager, x, y);
|
||||||
pointer_pos.x,
|
|
||||||
pointer_pos.y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
static double
|
||||||
|
Loading…
Reference in New Issue
Block a user