aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cb75e6d5..bafbffd0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -293,9 +293,13 @@ this correctly.
Object structs should only be destroyed when their resource is destroyed, ie.
in the resource destroy handler (set with `wl_resource_set_implementation`).
-Destructor requests should only call `wl_resource_destroy`.
-The compositor should not destroy resources on its own.
+- If the object has a destructor request: the request handler should just call
+ `wl_resource_destroy` and do nothing else. The compositor must not destroy
+ resources on its own outside the destructor request handler.
+- If the protocol specifies that an object is destroyed when an event is sent:
+ it's the only case where the compositor is allowed to send the event and then
+ call `wl_resource_destroy`. An example of this is `wl_callback`.
### Inert resources