wayland: Look up cursor renderer for device on MetaWaylandPointer

Make it explicitly look up the pointer device, instead of implicitly
relying on it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
Carlos Garnacho 2020-07-10 23:31:26 +02:00 committed by Marge Bot
parent 35abb8ab53
commit 0d83fcc870

View File

@ -1168,8 +1168,13 @@ pointer_set_cursor (struct wl_client *client,
if (surface) if (surface)
{ {
ClutterBackend *clutter_backend = clutter_get_default_backend ();
ClutterSeat *clutter_seat =
clutter_backend_get_default_seat (clutter_backend);
ClutterInputDevice *device = clutter_seat_get_pointer (clutter_seat);
MetaCursorRenderer *cursor_renderer = MetaCursorRenderer *cursor_renderer =
meta_backend_get_cursor_renderer (meta_get_backend ()); meta_backend_get_cursor_renderer_for_device (meta_get_backend (),
device);
MetaWaylandCursorSurface *cursor_surface; MetaWaylandCursorSurface *cursor_surface;
cursor_surface = META_WAYLAND_CURSOR_SURFACE (surface->role); cursor_surface = META_WAYLAND_CURSOR_SURFACE (surface->role);