diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index 43e88aac4..c0dc0c62b 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -72,10 +72,18 @@ meta_wayland_actor_surface_assigned (MetaWaylandSurfaceRole *surface_role) meta_wayland_actor_surface_get_instance_private (META_WAYLAND_ACTOR_SURFACE (surface_role)); MetaWaylandSurface *surface = meta_wayland_surface_role_get_surface (surface_role); + GList *l; meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (priv->actor), &surface->pending_frame_callback_list); wl_list_init (&surface->pending_frame_callback_list); + + for (l = surface->subsurfaces; l; l = l->next) + { + ClutterActor *subsurface_actor = + CLUTTER_ACTOR (meta_wayland_surface_get_actor (l->data)); + clutter_actor_add_child (CLUTTER_ACTOR (priv->actor), subsurface_actor); + } } static void diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index 399212da6..2a42305f6 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -471,8 +471,11 @@ wl_subcompositor_get_subsurface (struct wl_client *client, &surface->sub.parent_destroy_listener); parent->subsurfaces = g_list_append (parent->subsurfaces, surface); - clutter_actor_add_child (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)), - CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface))); + if (meta_wayland_surface_get_actor (parent)) + { + clutter_actor_add_child (CLUTTER_ACTOR (meta_wayland_surface_get_actor (parent)), + CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface))); + } clutter_actor_set_reactive (CLUTTER_ACTOR (meta_wayland_surface_get_actor (surface)), TRUE); }