mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-03 19:28:00 +02:00
libweston-desktop/xwayland: window type XWAYLAND cannot have a parent
Add an assert to ensure that a window of type XWAYLAND is never attempted with a parent. Following the code though, the assert can be made even stricter by allowing only TRANSIENT to have a parent. This is essentially adding documentation. v2: use stricter assert Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
44660c3b9c
commit
a838b7825f
1 changed files with 1 additions and 0 deletions
|
|
@ -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 == TRANSIENT);
|
||||
|
||||
if (to_add && surface->added) {
|
||||
surface->state = state;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue