[PATCH weston 3/6] libweston-desktop/xwayland: window type XWAYLAND cannot have a parent

Pekka Paalanen ppaalanen at gmail.com
Thu Nov 24 11:40:47 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Add an assert to ensure that a window of type XWAYLAND is never
attempted with a parent.

This essentially adding documentation.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 libweston-desktop/xwayland.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c
index bd68bc6..0c4ff2b 100644
--- a/libweston-desktop/xwayland.c
+++ b/libweston-desktop/xwayland.c
@@ -74,6 +74,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
 	bool to_add = (parent == NULL && state != XWAYLAND);
 
 	assert(state != NONE);
+	assert(!parent || state != XWAYLAND);
 
 	if (to_add && surface->added) {
 		surface->state = state;
-- 
2.7.3



More information about the wayland-devel mailing list