mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
contributing: add note about events that destroy objects
This commit is contained in:
parent
fd0a845cb4
commit
9b85a8b43d
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue