[mutter/wip/carlosg/shutdown-warning] compositor: Detach window and actor both ways on actor dispose
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/shutdown-warning] compositor: Detach window and actor both ways on actor dispose
- Date: Sat, 30 Apr 2022 13:02:41 +0000 (UTC)
commit ebc70272fce24ea7e31620b38ab5b06d142dc311
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Apr 30 14:59:43 2022 +0200
compositor: Detach window and actor both ways on actor dispose
This is currently deferred to the window being unmanaged, however
the dependency of events is too indirect to consider these things
always happen one after the other.
Fixes possible warnings like:
(mutter:872101): GLib-GObject-WARNING **: 15:29:27.943: invalid unclassed pointer in cast to
'MetaWindowActor'
Seen on shutdown, a reliable reproducer is gnome-settings-daemon
test suite.
src/compositor/meta-window-actor.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 9cee56a371..59ae4163c6 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -447,7 +447,11 @@ meta_window_actor_dispose (GObject *object)
meta_compositor_remove_window_actor (compositor, self);
- g_clear_object (&priv->window);
+ if (priv->window)
+ {
+ meta_window_set_compositor_private (priv->window, NULL);
+ g_clear_object (&priv->window);
+ }
if (priv->surface)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]