[mutter/wip/carlosg/input-thread: 49/96] wayland: Look up cursor renderer for device on MetaWaylandPointer




commit 2192e1f994ba0d65475a142a6ae9ae4d971a7be0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jul 10 23:31:26 2020 +0200

    wayland: Look up cursor renderer for device on MetaWaylandPointer
    
    Make it explicitly look up the pointer device, instead of implicitly
    relying on it.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403

 src/wayland/meta-wayland-pointer.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index eb46ecc1d2..c71a5eee18 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -1168,8 +1168,13 @@ pointer_set_cursor (struct wl_client *client,
 
   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 =
-        meta_backend_get_cursor_renderer (meta_get_backend ());
+        meta_backend_get_cursor_renderer_for_device (meta_get_backend (),
+                                                     device);
       MetaWaylandCursorSurface *cursor_surface;
 
       cursor_surface = META_WAYLAND_CURSOR_SURFACE (surface->role);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]