summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/meta-wayland-subsurface.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index bf14e0e3c..b4c503d20 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -67,6 +67,17 @@ transform_subsurface_position (MetaWaylandSurface *surface,
while (surface);
}
+static gboolean
+should_show (MetaWaylandSurface *surface)
+{
+ if (!surface->buffer_ref->buffer)
+ return FALSE;
+ else if (surface->sub.parent)
+ return should_show (surface->sub.parent);
+ else
+ return TRUE;
+}
+
static void
sync_actor_subsurface_state (MetaWaylandSurface *surface)
{
@@ -87,7 +98,7 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface)
clutter_actor_set_position (actor, x, y);
clutter_actor_set_reactive (actor, TRUE);
- if (surface->buffer_ref->buffer)
+ if (should_show (surface))
clutter_actor_show (actor);
else
clutter_actor_hide (actor);