From 09120132ef87061d527b5324a14ab5950db3dc0a Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 8 Jun 2015 11:55:54 +0200 Subject: [PATCH] core: Refrain from showing wayland windows when we don't have a buffer yet The "calc showing" operation is queued in a few places alongside MetaWindow creation, we should be ignoring these until there is a buffer to show. https://bugzilla.gnome.org/show_bug.cgi?id=750552 --- src/core/window.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index ef85aab39..4443a2402 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -58,6 +58,7 @@ #ifdef HAVE_WAYLAND #include "wayland/meta-window-wayland.h" +#include "wayland/meta-wayland-surface.h" #include "wayland/meta-wayland-private.h" #endif @@ -723,6 +724,10 @@ meta_window_should_attach_to_parent (MetaWindow *window) static gboolean client_window_should_be_mapped (MetaWindow *window) { + if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND && + !window->surface->buffer) + return FALSE; + return !window->shaded; } @@ -1533,6 +1538,10 @@ meta_window_showing_on_its_workspace (MetaWindow *window) gboolean meta_window_should_be_showing (MetaWindow *window) { + if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND && + !window->surface->buffer) + return FALSE; + /* Windows should be showing if they're located on the * active workspace and they're showing on their own workspace. */ return (meta_window_located_on_workspace (window, window->screen->active_workspace) &&