diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index c17d8bc6c..a0d9acf5d 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -1153,16 +1153,14 @@ meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer) if (surface) { - g_autoptr (MetaCursorSprite) cursor_sprite = NULL; + MetaCursorSprite *cursor_sprite = NULL; if (pointer->cursor_surface) { MetaWaylandCursorSurface *cursor_surface = META_WAYLAND_CURSOR_SURFACE (pointer->cursor_surface->role); - MetaCursorSprite *sprite; - sprite = meta_wayland_cursor_surface_get_sprite (cursor_surface); - cursor_sprite = g_object_ref (sprite); + cursor_sprite = meta_wayland_cursor_surface_get_sprite (cursor_surface); } else if (pointer->cursor_shape != META_CURSOR_INVALID) { @@ -1173,7 +1171,7 @@ meta_wayland_pointer_update_cursor_surface (MetaWaylandPointer *pointer) cursor_tracker); } - cursor_sprite = g_object_ref (META_CURSOR_SPRITE (pointer->shape_sprite)); + cursor_sprite = META_CURSOR_SPRITE (pointer->shape_sprite); } meta_cursor_tracker_set_window_cursor (cursor_tracker, cursor_sprite); diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c index 2ec97df9e..b6a684f2e 100644 --- a/src/wayland/meta-wayland-tablet-tool.c +++ b/src/wayland/meta-wayland-tablet-tool.c @@ -120,7 +120,7 @@ meta_wayland_tablet_tool_update_cursor_surface (MetaWaylandTabletTool *tool) MetaBackend *backend = backend_from_tool (tool); MetaCursorTracker *cursor_tracker = meta_backend_get_cursor_tracker (backend); - g_autoptr (MetaCursorSprite) cursor_sprite = NULL; + MetaCursorSprite *cursor_sprite = NULL; if (tool->cursor_renderer == NULL) return; @@ -132,10 +132,8 @@ meta_wayland_tablet_tool_update_cursor_surface (MetaWaylandTabletTool *tool) { MetaWaylandCursorSurface *cursor_surface = META_WAYLAND_CURSOR_SURFACE (tool->cursor_surface->role); - MetaCursorSprite *sprite; - sprite = meta_wayland_cursor_surface_get_sprite (cursor_surface); - cursor_sprite = g_object_ref (sprite); + cursor_sprite = meta_wayland_cursor_surface_get_sprite (cursor_surface); } else if (tool->cursor_shape != META_CURSOR_INVALID) { @@ -146,15 +144,12 @@ meta_wayland_tablet_tool_update_cursor_surface (MetaWaylandTabletTool *tool) cursor_tracker); } - cursor_sprite = g_object_ref (META_CURSOR_SPRITE (tool->shape_sprite)); + cursor_sprite = META_CURSOR_SPRITE (tool->shape_sprite); } } else if (tool->current_tablet) { - MetaCursorSprite *sprite; - - sprite = META_CURSOR_SPRITE (tool->default_sprite); - cursor_sprite = g_object_ref (sprite); + cursor_sprite = META_CURSOR_SPRITE (tool->default_sprite); } meta_cursor_renderer_set_cursor (tool->cursor_renderer, cursor_sprite);