From 79248e4961d49da1858917a902ba6b8fcc0bead1 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 29 Nov 2022 17:55:04 +0300 Subject: xdg-shell: use defunct_role_object error --- protocol/meson.build | 2 +- types/xdg_shell/wlr_xdg_surface.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/protocol/meson.build b/protocol/meson.build index 1928df9f..965dc342 100644 --- a/protocol/meson.build +++ b/protocol/meson.build @@ -1,5 +1,5 @@ wayland_protos = dependency('wayland-protocols', - version: '>=1.28', + version: '>=1.31', fallback: 'wayland-protocols', default_options: ['tests=false'], ) diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c index 0ba3c98e..f554eb6e 100644 --- a/types/xdg_shell/wlr_xdg_surface.c +++ b/types/xdg_shell/wlr_xdg_surface.c @@ -236,8 +236,9 @@ static void xdg_surface_handle_destroy(struct wl_client *client, } if (surface->role != WLR_XDG_SURFACE_ROLE_NONE) { - wlr_log(WLR_ERROR, "Tried to destroy an xdg_surface before its role " - "object"); + wl_resource_post_error(resource, + XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT, + "surface was destroyed before its role object"); return; } -- cgit v1.2.3