|
|
79df40 |
From 68bdb7ef345a2887ca8570fadbdca81404899b0a Mon Sep 17 00:00:00 2001
|
|
|
79df40 |
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
|
|
79df40 |
Date: Thu, 25 Jul 2019 02:10:07 +0200
|
|
|
79df40 |
Subject: [PATCH 27/28] window-actor: Unset the window compositor private on
|
|
|
79df40 |
destruction
|
|
|
79df40 |
|
|
|
79df40 |
A window actor could be destroyed before than the related Window (if for
|
|
|
79df40 |
example, it is explicitly removed from the stage or destroyed), in such case
|
|
|
79df40 |
we need to unset the compositor private for the window on disposition, or once
|
|
|
79df40 |
the window is actually destroyed, we will try to access to an invalid pointer,
|
|
|
79df40 |
and to remove an invalid window actor from the compositor.
|
|
|
79df40 |
|
|
|
79df40 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/682
|
|
|
79df40 |
---
|
|
|
79df40 |
src/compositor/meta-window-actor.c | 1 +
|
|
|
79df40 |
1 file changed, 1 insertion(+)
|
|
|
79df40 |
|
|
|
79df40 |
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
|
|
|
79df40 |
index f1f86e14b..39198dbe1 100644
|
|
|
79df40 |
--- a/src/compositor/meta-window-actor.c
|
|
|
79df40 |
+++ b/src/compositor/meta-window-actor.c
|
|
|
79df40 |
@@ -480,60 +480,61 @@ meta_window_actor_constructed (GObject *object)
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
static void
|
|
|
79df40 |
meta_window_actor_dispose (GObject *object)
|
|
|
79df40 |
{
|
|
|
79df40 |
MetaWindowActor *self = META_WINDOW_ACTOR (object);
|
|
|
79df40 |
MetaWindowActorPrivate *priv = self->priv;
|
|
|
79df40 |
MetaCompositor *compositor = priv->compositor;
|
|
|
79df40 |
|
|
|
79df40 |
if (priv->disposed)
|
|
|
79df40 |
return;
|
|
|
79df40 |
|
|
|
79df40 |
priv->disposed = TRUE;
|
|
|
79df40 |
|
|
|
79df40 |
if (priv->send_frame_messages_timer != 0)
|
|
|
79df40 |
{
|
|
|
79df40 |
g_source_remove (priv->send_frame_messages_timer);
|
|
|
79df40 |
priv->send_frame_messages_timer = 0;
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
g_clear_pointer (&priv->shape_region, cairo_region_destroy);
|
|
|
79df40 |
g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
|
|
|
79df40 |
|
|
|
79df40 |
g_clear_pointer (&priv->shadow_class, g_free);
|
|
|
79df40 |
g_clear_pointer (&priv->focused_shadow, meta_shadow_unref);
|
|
|
79df40 |
g_clear_pointer (&priv->unfocused_shadow, meta_shadow_unref);
|
|
|
79df40 |
g_clear_pointer (&priv->shadow_shape, meta_window_shape_unref);
|
|
|
79df40 |
|
|
|
79df40 |
compositor->windows = g_list_remove (compositor->windows, (gconstpointer) self);
|
|
|
79df40 |
|
|
|
79df40 |
+ meta_window_set_compositor_private (priv->window, NULL);
|
|
|
79df40 |
g_clear_object (&priv->window);
|
|
|
79df40 |
|
|
|
79df40 |
set_surface (self, NULL);
|
|
|
79df40 |
|
|
|
79df40 |
G_OBJECT_CLASS (meta_window_actor_parent_class)->dispose (object);
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
static void
|
|
|
79df40 |
meta_window_actor_finalize (GObject *object)
|
|
|
79df40 |
{
|
|
|
79df40 |
MetaWindowActor *self = META_WINDOW_ACTOR (object);
|
|
|
79df40 |
MetaWindowActorPrivate *priv = self->priv;
|
|
|
79df40 |
|
|
|
79df40 |
g_list_free_full (priv->frames, (GDestroyNotify) frame_data_free);
|
|
|
79df40 |
|
|
|
79df40 |
G_OBJECT_CLASS (meta_window_actor_parent_class)->finalize (object);
|
|
|
79df40 |
}
|
|
|
79df40 |
|
|
|
79df40 |
static void
|
|
|
79df40 |
meta_window_actor_set_property (GObject *object,
|
|
|
79df40 |
guint prop_id,
|
|
|
79df40 |
const GValue *value,
|
|
|
79df40 |
GParamSpec *pspec)
|
|
|
79df40 |
{
|
|
|
79df40 |
MetaWindowActor *self = META_WINDOW_ACTOR (object);
|
|
|
79df40 |
MetaWindowActorPrivate *priv = self->priv;
|
|
|
79df40 |
|
|
|
79df40 |
switch (prop_id)
|
|
|
79df40 |
{
|
|
|
79df40 |
case PROP_META_WINDOW:
|
|
|
79df40 |
--
|
|
|
79df40 |
2.26.2
|
|
|
79df40 |
|