diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 0f70b23ce..385a2985c 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -374,8 +374,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer, manager = clutter_device_manager_get_default (); pointer->device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE); - - pointer->cursor_tracker = meta_cursor_tracker_get_for_screen (NULL); } void @@ -730,8 +728,7 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer, void meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer) { - if (pointer->cursor_tracker == NULL) - return; + MetaCursorTracker *cursor_tracker = meta_cursor_tracker_get_for_screen (NULL); if (pointer->current) { @@ -747,15 +744,14 @@ meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer) else cursor_sprite = NULL; - meta_cursor_tracker_set_window_cursor (pointer->cursor_tracker, - cursor_sprite); + meta_cursor_tracker_set_window_cursor (cursor_tracker, cursor_sprite); if (cursor_sprite) g_object_unref (cursor_sprite); } else { - meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker); + meta_cursor_tracker_unset_window_cursor (cursor_tracker); } } diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h index 8dfbf627f..8d0cb102e 100644 --- a/src/wayland/meta-wayland-pointer.h +++ b/src/wayland/meta-wayland-pointer.h @@ -65,7 +65,6 @@ struct _MetaWaylandPointer guint32 focus_serial; guint32 click_serial; - MetaCursorTracker *cursor_tracker; MetaWaylandSurface *cursor_surface; struct wl_listener cursor_surface_destroy_listener; int hotspot_x, hotspot_y;