From 54ba64b9f22f02893bc8c593358d6ace842be40c Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Wed, 11 May 2022 22:49:08 +0200 Subject: [PATCH] window-actor/wayland: Only use scanout for opaque non-fullscreen windows This could for example happen with the client window created by the desktop-icons-ng extension which spans the entire desktop, but is not a fullscreen window and uses transparency On Wayland only opaque surfaces or transparent surfaces of fullscreen windows can be used for direct scanout. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2263 Part-of: --- src/compositor/meta-window-actor-wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compositor/meta-window-actor-wayland.c b/src/compositor/meta-window-actor-wayland.c index 4b87fd11f..e1f341048 100644 --- a/src/compositor/meta-window-actor-wayland.c +++ b/src/compositor/meta-window-actor-wayland.c @@ -93,6 +93,7 @@ meta_window_actor_wayland_get_scanout_candidate (MetaWindowActor *actor) { ClutterActor *child_actor; MetaSurfaceActor *topmost_surface_actor; + MetaWindow *window; child_actor = clutter_actor_get_last_child (CLUTTER_ACTOR (actor)); if (!child_actor || !META_IS_SURFACE_ACTOR_WAYLAND (child_actor)) @@ -100,6 +101,11 @@ meta_window_actor_wayland_get_scanout_candidate (MetaWindowActor *actor) topmost_surface_actor = META_SURFACE_ACTOR (child_actor); + window = meta_window_actor_get_meta_window (actor); + if (!meta_window_is_fullscreen (window) && + !meta_surface_actor_is_opaque (topmost_surface_actor)) + return NULL; + return topmost_surface_actor; }