summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-05-04 21:52:45 +0200
committerJonas Ådahl <jadahl@gmail.com>2018-05-07 19:16:40 +0000
commit332d55f7f6b5d646ea9bc2586b2135113c9d3074 (patch)
tree02c12ac09de2596bd4710aee0426ea46314c8616
parent98d702428857c79770b159137835622e33b84ba9 (diff)
downloadmutter-332d55f7f6b5d646ea9bc2586b2135113c9d3074.tar.gz
wayland/xdg-foreign: Fix child surface validation check
The role type should be either an xdg-shell toplevel, or a xdg-shell unstable v6 toplevel. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/138
-rw-r--r--src/wayland/meta-wayland-xdg-foreign.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wayland/meta-wayland-xdg-foreign.c b/src/wayland/meta-wayland-xdg-foreign.c
index cecef50a9..49ada7ada 100644
--- a/src/wayland/meta-wayland-xdg-foreign.c
+++ b/src/wayland/meta-wayland-xdg-foreign.c
@@ -252,10 +252,8 @@ is_valid_child (MetaWaylandSurface *surface)
if (!surface->role)
return FALSE;
- if (!META_IS_WAYLAND_XDG_SURFACE (surface->role))
- return FALSE;
-
- if (!META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role))
+ if (!META_IS_WAYLAND_XDG_TOPLEVEL (surface->role) &&
+ !META_IS_WAYLAND_ZXDG_TOPLEVEL_V6 (surface->role))
return FALSE;
if (!surface->window)