wayland: Fix wrong condition in xdg_exporter.export

Commit d714a94d9 added support for stable xdg-shell surfaces while
preserving old unstable zxdg-shell v6 ones, but committed a mistake
in checking for both in the xdg_exporter.export error condition
paths. We want to check that the surface is neither of both.

https://gitlab.gnome.org/GNOME/mutter/issues/63

Closes: #63
This commit is contained in:
Carlos Garnacho 2018-03-12 17:08:18 +01:00 committed by Carlos Garnacho
parent f1bbe5c251
commit 419fb81d40

View File

@ -144,10 +144,9 @@ xdg_exporter_export (struct wl_client *client,
MetaWaylandXdgExported *exported; MetaWaylandXdgExported *exported;
char *handle; char *handle;
if (!surface->role || if (!surface->role || !surface->window ||
!META_IS_WAYLAND_XDG_SURFACE (surface->role) || !(META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
!META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role) || META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role)))
!surface->window)
{ {
wl_resource_post_error (resource, wl_resource_post_error (resource,
WL_DISPLAY_ERROR_INVALID_OBJECT, WL_DISPLAY_ERROR_INVALID_OBJECT,