protocol: add defunct_role_object error

This commit adds wl_surface.defunct_role_object error, which has
semantics similar to xdg_wm_base.defunct_surfaces error, and is sent
when a client destroys a surface while the corresponding role object
still exists.

Signed-off-by: Kirill Primak <vyivel@eclair.cafe>
This commit is contained in:
Kirill Primak 2022-10-15 20:26:42 +03:00 committed by Simon Ser
parent 68dfa1183f
commit 0dc23e380a

View file

@ -1384,8 +1384,9 @@
that this request gives a role to a wl_surface. Often, this
request also creates a new protocol object that represents the
role and adds additional functionality to wl_surface. When a
client wants to destroy a wl_surface, they must destroy this 'role
object' before the wl_surface.
client wants to destroy a wl_surface, they must destroy this role
object before the wl_surface, otherwise a defunct_role_object error is
sent.
Destroying the role object does not remove the role from the
wl_surface, but it may stop the wl_surface from "playing the role".
@ -1405,6 +1406,8 @@
<entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
<entry name="invalid_size" value="2" summary="buffer size is invalid"/>
<entry name="invalid_offset" value="3" summary="buffer offset is invalid"/>
<entry name="defunct_role_object" value="4"
summary="surface was destroyed before its role object"/>
</enum>
<request name="destroy" type="destructor">