From df3f81e709b7df3fbc89192e146e9776fc29f115 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 7 Jan 2022 17:31:47 +0100 Subject: [PATCH] compositor/native: Consider Wayland subsurfaces for scanout If a Wayland subsurface is the topmost actor, consider in for scanout as well. This will extend our scanout capabilities to apps like Firefox While on it, correct a unnessary type check to a NULL check. Part-of: --- src/compositor/meta-compositor-native.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compositor/meta-compositor-native.c b/src/compositor/meta-compositor-native.c index 7822789a3..dd77bb7ae 100644 --- a/src/compositor/meta-compositor-native.c +++ b/src/compositor/meta-compositor-native.c @@ -95,9 +95,6 @@ maybe_assign_primary_plane (MetaCompositor *compositor) if (clutter_actor_has_transitions (CLUTTER_ACTOR (window_actor))) goto done; - if (clutter_actor_get_n_children (CLUTTER_ACTOR (window_actor)) != 1) - goto done; - window = meta_window_actor_get_meta_window (window_actor); if (!window) goto done; @@ -114,8 +111,10 @@ maybe_assign_primary_plane (MetaCompositor *compositor) if (!COGL_IS_ONSCREEN (framebuffer)) goto done; - surface_actor = meta_window_actor_get_surface (window_actor); - if (!META_IS_SURFACE_ACTOR_WAYLAND (surface_actor)) + surface_actor = meta_window_actor_get_topmost_surface (window_actor); + if (!surface_actor || + CLUTTER_ACTOR (surface_actor) != + clutter_actor_get_last_child (CLUTTER_ACTOR (window_actor))) goto done; surface_actor_wayland = META_SURFACE_ACTOR_WAYLAND (surface_actor);