From ad22833cc39cb3411f873c7d3cfb135d2efc94f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 3 May 2024 18:22:38 +0200 Subject: [PATCH] wayland/subsurface: Hold surface reference in placement ops Will be necessary with the next commit. Part-of: --- src/wayland/meta-wayland-subsurface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index acfc7f8b9..b264a4b5b 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -318,7 +318,7 @@ get_subsurface_placement_op (MetaWaylandSurface *surface, GNode *sibling_node; op->placement = placement; - op->surface = surface; + op->surface = g_object_ref (surface); g_node_unlink (surface->committed_state.subsurface_branch_node); @@ -352,6 +352,7 @@ get_subsurface_placement_op (MetaWaylandSurface *surface, void meta_wayland_subsurface_destroy_placement_op (MetaWaylandSubsurfacePlacementOp *op) { + g_clear_object (&op->surface); g_clear_object (&op->sibling); g_free (op); }