summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2023-04-21 21:07:01 +0200
committerCarlos Garnacho <carlosg@gnome.org>2023-04-25 17:34:24 +0200
commit18be74edeb58d755f7e9647f70e9faf4e4259f21 (patch)
treef94aa0c30bfd92c9fd6dcb8154806107e95e6884
parent5eb17a362e880e6d53a2202ee15c962940f1c4a5 (diff)
downloadmutter-18be74edeb58d755f7e9647f70e9faf4e4259f21.tar.gz
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2975>
-rw-r--r--src/core/window.c4
1 files 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