Skip to content

Commit

Permalink
compositor/native: Consider Wayland subsurfaces for scanout
Browse files Browse the repository at this point in the history
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2211>
  • Loading branch information
rmader authored and Marge Bot committed Jan 7, 2022
1 parent 8abe876 commit df3f81e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/compositor/meta-compositor-native.c
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit df3f81e

Please sign in to comment.