From dc43bb9f6874224b5cbae988aa8ffc3673213a6f Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 11 May 2022 22:41:29 +0200 Subject: [PATCH] window-actor/x11: Don't use direct scanout if the window is not opaque Some windows span the entire screen but still use transparency, such as the desktop window of Nemo. When these windows were used for direct scanout, the transparent areas would turn black and nothing else would be rendered. In addition to checking the surface for opaqueness, for X11 windows also the window actor itself has to be checked, because its opacity might have been changed via _NET_WM_WINDOW_OPACITY. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2263 Part-of: --- src/compositor/meta-window-actor-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c index d06855b51..82eaa428b 100644 --- a/src/compositor/meta-window-actor-x11.c +++ b/src/compositor/meta-window-actor-x11.c @@ -445,6 +445,9 @@ meta_window_actor_x11_get_scanout_candidate (MetaWindowActor *actor) clutter_actor_get_last_child (CLUTTER_ACTOR (actor))) return NULL; + if (!meta_window_actor_is_opaque (actor)) + return NULL; + return surface_actor; }