From 8d53ae894b7be75520f74e8afc7009b0360af156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 10 Sep 2014 23:55:22 +0200 Subject: [PATCH] window-actor: Skip frame-sync when the corresponding window is gone https://bugzilla.gnome.org/show_bug.cgi?id=735927 --- src/compositor/meta-window-actor.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 278f0c839..39864d6c6 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -927,7 +927,12 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self, gboolean no_delay_frame) { MetaWindowActorPrivate *priv = self->priv; - FrameData *frame = g_slice_new0 (FrameData); + FrameData *frame; + + if (meta_window_actor_is_destroyed (self)) + return; + + frame = g_slice_new0 (FrameData); priv->needs_frame_drawn = TRUE; @@ -1903,6 +1908,9 @@ meta_window_actor_pre_paint (MetaWindowActor *self) MetaWindowActorPrivate *priv = self->priv; GList *l; + if (meta_window_actor_is_destroyed (self)) + return; + meta_window_actor_handle_updates (self); for (l = priv->frames; l != NULL; l = l->next) @@ -1952,6 +1960,9 @@ meta_window_actor_post_paint (MetaWindowActor *self) priv->repaint_scheduled = FALSE; + if (meta_window_actor_is_destroyed (self)) + return; + /* This window had damage, but wasn't actually redrawn because * it is obscured. So we should wait until timer expiration * before sending _NET_WM_FRAME_* messages. @@ -2039,6 +2050,9 @@ meta_window_actor_frame_complete (MetaWindowActor *self, MetaWindowActorPrivate *priv = self->priv; GList *l; + if (meta_window_actor_is_destroyed (self)) + return; + for (l = priv->frames; l;) { GList *l_next = l->next;