summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-03-12 17:08:18 +0100
committerCarlos Garnacho <mrgarnacho@gmail.com>2018-03-12 17:15:07 +0000
commit419fb81d401408084858a62767409baca17fd1c4 (patch)
tree7dce8ce207c43e0d4f29a39a564d0e5e6f53d3cb /src
parentf1bbe5c2510c1ecfc1f16406c9735e23809af7e0 (diff)
downloadmutter-419fb81d401408084858a62767409baca17fd1c4.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/wayland/meta-wayland-xdg-foreign.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wayland/meta-wayland-xdg-foreign.c b/src/wayland/meta-wayland-xdg-foreign.c
index cfeb81738..a04b2bfa7 100644
--- a/src/wayland/meta-wayland-xdg-foreign.c
+++ b/src/wayland/meta-wayland-xdg-foreign.c
@@ -144,10 +144,9 @@ xdg_exporter_export (struct wl_client *client,
MetaWaylandXdgExported *exported;
char *handle;
- if (!surface->role ||
- !META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
- !META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role) ||
- !surface->window)
+ if (!surface->role || !surface->window ||
+ !(META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
+ META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role)))
{
wl_resource_post_error (resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,