xdg-shell: use defunct_role_object error

This commit is contained in:
Kirill Primak 2022-11-29 17:55:04 +03:00
parent 90a6c7b7e1
commit 79248e4961
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,5 @@
wayland_protos = dependency('wayland-protocols', wayland_protos = dependency('wayland-protocols',
version: '>=1.28', version: '>=1.31',
fallback: 'wayland-protocols', fallback: 'wayland-protocols',
default_options: ['tests=false'], default_options: ['tests=false'],
) )

View file

@ -236,8 +236,9 @@ static void xdg_surface_handle_destroy(struct wl_client *client,
} }
if (surface->role != WLR_XDG_SURFACE_ROLE_NONE) { if (surface->role != WLR_XDG_SURFACE_ROLE_NONE) {
wlr_log(WLR_ERROR, "Tried to destroy an xdg_surface before its role " wl_resource_post_error(resource,
"object"); XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
"surface was destroyed before its role object");
return; return;
} }