summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-xdg-foreign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland/meta-wayland-xdg-foreign.c')
-rw-r--r--src/wayland/meta-wayland-xdg-foreign.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-xdg-foreign.c b/src/wayland/meta-wayland-xdg-foreign.c
index faf373ee8..cfeb81738 100644
--- a/src/wayland/meta-wayland-xdg-foreign.c
+++ b/src/wayland/meta-wayland-xdg-foreign.c
@@ -32,6 +32,7 @@
#include "wayland/meta-wayland-private.h"
#include "wayland/meta-wayland-versions.h"
#include "wayland/meta-wayland-xdg-shell.h"
+#include "wayland/meta-wayland-legacy-xdg-shell.h"
#include "xdg-foreign-unstable-v1-server-protocol.h"
@@ -145,6 +146,7 @@ xdg_exporter_export (struct wl_client *client,
if (!surface->role ||
!META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
+ !META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role) ||
!surface->window)
{
wl_resource_post_error (resource,
@@ -254,6 +256,9 @@ is_valid_child (MetaWaylandSurface *surface)
if (!META_IS_WAYLAND_XDG_SURFACE (surface->role))
return FALSE;
+ if (!META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role))
+ return FALSE;
+
if (!surface->window)
return FALSE;
@@ -376,7 +381,9 @@ xdg_importer_import (struct wl_client *client,
xdg_imported_destructor);
exported = g_hash_table_lookup (foreign->exported_surfaces, handle);
- if (!exported || !META_IS_WAYLAND_XDG_SURFACE (exported->surface->role))
+ if (!exported ||
+ (!META_IS_WAYLAND_XDG_SURFACE (exported->surface->role) &&
+ !META_IS_WAYLAND_ZXDG_SURFACE_V6 (exported->surface->role)))
{
zxdg_imported_v1_send_destroyed (resource);
return;