Commit 5eac1d69 authored by Jonas Ådahl's avatar Jonas Ådahl Committed by Georges Basile Stavracas Neto

wayland/surface: Clear texture when attaching NULL

When 252e64a0 moved the texture
ownership to MetaWaylandSurface, it failed to handle the case when a
NULL-buffer is attached, leaving the texture reference in place. This
caused issues when the surface should have been hidden (e.g. attaching a
NULL buffer to a cursor surface for hiding the cursor sprite).

Related: #630
parent 9b535839
......@@ -737,6 +737,10 @@ meta_wayland_surface_apply_pending_state (MetaWaylandSurface *surface,
g_clear_pointer (&snippet, cogl_object_unref);
}
}
else
{
cogl_clear_object (&surface->texture);
}
/* If the newly attached buffer is going to be accessed directly without
* making a copy, such as an EGL buffer, mark it as in-use don't release
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment