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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4367>
This commit is contained in:
Carlos Garnacho 2025-03-26 12:10:01 +01:00 committed by Bruce Leidl
parent 8b20a75df9
commit d2fdb99838

View File

@ -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);
}