diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index e558d48b5..9d8e9dcc9 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -450,6 +450,20 @@ meta_compositor_manage (MetaCompositor *compositor) g_error ("Compositor failed to manage display: %s", error->message); } +static void +meta_compositor_real_unmanage (MetaCompositor *compositor) +{ + MetaCompositorPrivate *priv = + meta_compositor_get_instance_private (compositor); + + g_clear_signal_handler (&priv->top_window_actor_destroy_id, + priv->top_window_actor); + + g_clear_pointer (&priv->window_group, clutter_actor_destroy); + g_clear_pointer (&priv->top_window_group, clutter_actor_destroy); + g_clear_pointer (&priv->feedback_group, clutter_actor_destroy); +} + void meta_compositor_unmanage (MetaCompositor *compositor) { @@ -1118,12 +1132,6 @@ meta_compositor_dispose (GObject *object) g_clear_signal_handler (&priv->before_paint_handler_id, stage); g_clear_signal_handler (&priv->after_paint_handler_id, stage); - g_clear_signal_handler (&priv->top_window_actor_destroy_id, - priv->top_window_actor); - - g_clear_pointer (&priv->window_group, clutter_actor_destroy); - g_clear_pointer (&priv->top_window_group, clutter_actor_destroy); - g_clear_pointer (&priv->feedback_group, clutter_actor_destroy); g_clear_pointer (&priv->windows, g_list_free); G_OBJECT_CLASS (meta_compositor_parent_class)->dispose (object); @@ -1139,6 +1147,7 @@ meta_compositor_class_init (MetaCompositorClass *klass) object_class->constructed = meta_compositor_constructed; object_class->dispose = meta_compositor_dispose; + klass->unmanage = meta_compositor_real_unmanage; klass->remove_window = meta_compositor_real_remove_window; klass->before_paint = meta_compositor_real_before_paint; klass->after_paint = meta_compositor_real_after_paint; diff --git a/src/compositor/meta-compositor-server.c b/src/compositor/meta-compositor-server.c index 179dc83ef..f0d469172 100644 --- a/src/compositor/meta-compositor-server.c +++ b/src/compositor/meta-compositor-server.c @@ -33,11 +33,6 @@ meta_compositor_server_manage (MetaCompositor *compositor, return TRUE; } -static void -meta_compositor_server_unmanage (MetaCompositor *compositor) -{ -} - static int64_t meta_compositor_server_monotonic_to_high_res_xserver_time (MetaCompositor *compositor, int64_t monotonic_time_us) @@ -92,7 +87,6 @@ meta_compositor_server_class_init (MetaCompositorServerClass *klass) MetaCompositorClass *compositor_class = META_COMPOSITOR_CLASS (klass); compositor_class->manage = meta_compositor_server_manage; - compositor_class->unmanage = meta_compositor_server_unmanage; compositor_class->monotonic_to_high_res_xserver_time = meta_compositor_server_monotonic_to_high_res_xserver_time; compositor_class->grab_begin = meta_compositor_server_grab_begin; diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c index a16604640..61b75026b 100644 --- a/src/compositor/meta-compositor-x11.c +++ b/src/compositor/meta-compositor-x11.c @@ -209,6 +209,7 @@ meta_compositor_x11_unmanage (MetaCompositor *compositor) MetaX11Display *x11_display = display->x11_display; Display *xdisplay = x11_display->xdisplay; Window xroot = x11_display->xroot; + MetaCompositorClass *parent_class; /* * This is the most important part of cleanup - we have to do this before @@ -216,6 +217,9 @@ meta_compositor_x11_unmanage (MetaCompositor *compositor) * able to redirect subwindows */ XCompositeUnredirectSubwindows (xdisplay, xroot, CompositeRedirectManual); + + parent_class = META_COMPOSITOR_CLASS (meta_compositor_x11_parent_class); + parent_class->unmanage (compositor); } /*