From 18be74edeb58d755f7e9647f70e9faf4e4259f21 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 21 Apr 2023 21:07:01 +0200 Subject: [PATCH] core: Fix map transitions for X11 windows on Wayland We are attempting to show windows that do not yet have a surface/buffer, this makes GNOME Shell avoid transitions for these windows. Since on Wayland X11 windows are also Wayland surfaces, this check is also valid for these, and is thus made more generic to also cater for these windows. Eventually, meta_window_update_visibility() is called when the surface gets its buffer, so the window can be neatly animated. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2611 Part-of: --- src/core/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index e1ac1f7eb..40cc7b7da 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -1695,10 +1695,10 @@ meta_window_should_be_showing_on_workspace (MetaWindow *window, MetaWorkspace *workspace) { #ifdef HAVE_WAYLAND - if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND) + if (meta_is_wayland_compositor ()) { MetaWaylandSurface *surface = meta_window_get_wayland_surface (window); - if (!meta_wayland_surface_get_buffer (surface)) + if (!surface || !meta_wayland_surface_get_buffer (surface)) return FALSE; } #endif