[Spice-devel] [PATCH spice-gtk] display: signal primary-destroy when clearing all surfaces
Jonathon Jongsma
jjongsma at redhat.com
Fri Apr 4 13:19:12 PDT 2014
ACK, but as you say, it's hard to tell if it will really fix that bug.
----- Original Message -----
> From: "Marc-André Lureau" <marcandre.lureau at gmail.com>
> To: spice-devel at lists.freedesktop.org
> Sent: Friday, April 4, 2014 10:50:23 AM
> Subject: [Spice-devel] [PATCH spice-gtk] display: signal primary-destroy when clearing all surfaces
>
> When destroying the primary surface, we need to signal it, since
> listeners might be referencing the data pointer. Currently, this only
> happens during channel finalize().
>
> This could help with rhbz#1082555.
> ---
> gtk/channel-display.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/gtk/channel-display.c b/gtk/channel-display.c
> index 96fd764..ff9f85c 100644
> --- a/gtk/channel-display.c
> +++ b/gtk/channel-display.c
> @@ -807,12 +807,18 @@ static display_surface
> *find_surface(SpiceDisplayChannelPrivate *c, guint32 surf
> return g_hash_table_lookup(c->surfaces, GINT_TO_POINTER(surface_id));
> }
>
> +/* main or coroutine context */
> static void clear_surfaces(SpiceChannel *channel, gboolean keep_primary)
> {
> SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv;
> GHashTableIter iter;
> display_surface *surface;
>
> + if (!keep_primary) {
> + c->primary = NULL;
> + emit_main_context(channel, SPICE_DISPLAY_PRIMARY_DESTROY);
> + }
> +
> g_hash_table_iter_init(&iter, c->surfaces);
> while (g_hash_table_iter_next(&iter, NULL, (gpointer*)&surface)) {
>
> --
> 1.8.5.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list