From d2fdb99838a612397463c67b055fb381408ef32b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 26 Mar 2025 12:10:01 +0100 Subject: [PATCH] wayland: Fix thinko in shape protocol implementation with tablet tools MetaWaylandTabletTool is not a GObject thus we cannot use weak pointers on them. The good news is that MetaWaylandTabletTool structs are perennial and we do not need to do that. Remove this unnecessary weak pointer handling, which can only cause runtime warnings or crashes. Part-of: --- src/wayland/meta-wayland-cursor-shape.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wayland/meta-wayland-cursor-shape.c b/src/wayland/meta-wayland-cursor-shape.c index 172ddf233..65de4acb1 100644 --- a/src/wayland/meta-wayland-cursor-shape.c +++ b/src/wayland/meta-wayland-cursor-shape.c @@ -123,8 +123,6 @@ meta_wayland_cursor_shape_device_new_tool (MetaWaylandTabletTool *tool) cursor_shape_device->type = META_WAYLAND_CURSOR_SHAPE_DEVICE_TYPE_TOOL; cursor_shape_device->tool = tool; - g_object_add_weak_pointer (G_OBJECT (tool), - (gpointer *) &cursor_shape_device->tool); return cursor_shape_device; } @@ -134,8 +132,6 @@ meta_wayland_cursor_shape_device_free (MetaWaylandCursorShapeDevice *cursor_shap { if (cursor_shape_device->type == META_WAYLAND_CURSOR_SHAPE_DEVICE_TYPE_POINTER) g_clear_weak_pointer ((gpointer *) &cursor_shape_device->pointer); - if (cursor_shape_device->type == META_WAYLAND_CURSOR_SHAPE_DEVICE_TYPE_TOOL) - g_clear_weak_pointer ((gpointer *) &cursor_shape_device->tool); g_free (cursor_shape_device); }