libweston-desktop/xwayland: XWAYLAND surfaces are never 'added'
Add documentation (asserts) that show that windows of types XWAYLAND are never registered with the shell. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
@@ -83,6 +83,8 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
|
|||||||
|
|
||||||
if (surface->state != state) {
|
if (surface->state != state) {
|
||||||
if (surface->state == XWAYLAND) {
|
if (surface->state == XWAYLAND) {
|
||||||
|
assert(!surface->added);
|
||||||
|
|
||||||
weston_desktop_surface_unlink_view(surface->view);
|
weston_desktop_surface_unlink_view(surface->view);
|
||||||
weston_view_destroy(surface->view);
|
weston_view_destroy(surface->view);
|
||||||
surface->view = NULL;
|
surface->view = NULL;
|
||||||
@@ -100,6 +102,8 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state == XWAYLAND) {
|
if (state == XWAYLAND) {
|
||||||
|
assert(!surface->added);
|
||||||
|
|
||||||
surface->view =
|
surface->view =
|
||||||
weston_desktop_surface_create_view(surface->surface);
|
weston_desktop_surface_create_view(surface->surface);
|
||||||
weston_layer_entry_insert(&surface->xwayland->layer.view_list,
|
weston_layer_entry_insert(&surface->xwayland->layer.view_list,
|
||||||
|
|||||||
Reference in New Issue
Block a user