From c4df317ea6aae7b7171ee1cb5e2695c19ad59b35 Mon Sep 17 00:00:00 2001
From: Simon Ser <contact@emersion.fr>
Date: Sun, 18 Aug 2024 18:38:03 +0200
Subject: [PATCH] xdg-toplevel-icon: add error for destroyed wl_buffer

This requirement was missing an error code.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/201
---
 staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml b/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml
index e9cb5d0a..4270d694 100644
--- a/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml
+++ b/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml
@@ -136,6 +136,9 @@
       <entry name="immutable"
              summary="the icon has already been assigned to a toplevel and must not be changed"
 	     value="2"/>
+      <entry name="no_buffer"
+             summary="the provided buffer has been destroyed before the toplevel icon"
+             value="3"/>
     </enum>
 
     <request name="destroy" type="destructor">
@@ -185,8 +188,9 @@
         overrides the preexisting pixel data.
 
         The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
-        it is associated with is not destroyed. The buffer contents must not be
-        modified after it was assigned to the icon.
+        it is associated with is not destroyed, otherwise a 'no_buffer' error
+        is raised. The buffer contents must not be modified after it was
+        assigned to the icon.
 
         If this request is made after the icon has been assigned to a toplevel
         via 'set_icon', a 'immutable' error must be raised.
-- 
GitLab