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
This commit is contained in:
Carlos Garnacho 2015-06-08 11:55:54 +02:00
parent cdac4d0e92
commit 09120132ef

View File

@ -58,6 +58,7 @@
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
#include "wayland/meta-window-wayland.h" #include "wayland/meta-window-wayland.h"
#include "wayland/meta-wayland-surface.h"
#include "wayland/meta-wayland-private.h" #include "wayland/meta-wayland-private.h"
#endif #endif
@ -723,6 +724,10 @@ meta_window_should_attach_to_parent (MetaWindow *window)
static gboolean static gboolean
client_window_should_be_mapped (MetaWindow *window) client_window_should_be_mapped (MetaWindow *window)
{ {
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
!window->surface->buffer)
return FALSE;
return !window->shaded; return !window->shaded;
} }
@ -1533,6 +1538,10 @@ meta_window_showing_on_its_workspace (MetaWindow *window)
gboolean gboolean
meta_window_should_be_showing (MetaWindow *window) 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 /* Windows should be showing if they're located on the
* active workspace and they're showing on their own workspace. */ * active workspace and they're showing on their own workspace. */
return (meta_window_located_on_workspace (window, window->screen->active_workspace) && return (meta_window_located_on_workspace (window, window->screen->active_workspace) &&