protocol: Clarify wl_buffer.release description

Sebastian pointed out that the existing text could be read as
wl_buffer.destroy not being allowed before the wl_buffer.release event
arrives, contrary to what the wl_surface.attach description says.
Clarify to be consistent with the latter.

This is a follow-up for
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/141 .

Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>

v2:
* Simplify clarification, don't talk about callbacks. (Julian Orth)
* Add reference to details in the description of wl_surface.attach.
  (Daniel Stone)
v3:
* Tweak clarification again. (Sebastian Wick)
v4:
* Make clarification even less ambiguous. (Simon Ser, Julian Orth)
v5:
* Just refer to the description of wl_surface.attach instead of trying
  to clarify anything here. (Sebastian Wick)
This commit is contained in:
Michel Dänzer 2025-01-21 15:27:22 +01:00 committed by Simon Ser
parent 7033e74857
commit 6137c8c213

View file

@ -501,8 +501,10 @@
<event name="release">
<description summary="compositor releases buffer">
Sent when this wl_buffer is no longer used by the compositor.
The client is now free to reuse or destroy this buffer and its
backing storage.
For more information on when release events may or may not be sent,
and what consequences it has, please see the description of
wl_surface.attach.
If a client receives a release event before the frame callback
requested in the same wl_surface.commit that attaches this