From 26c419e046a70521e07b849faae901c7521d90df Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Wed, 8 May 2024 20:54:19 +0200 Subject: [PATCH] protocol: clarify divergence in compositor behaviour This is intended to only document the current situation. Whether further behaviour will be defined is out of scope and left for protocol v7. See: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/363 Signed-off-by: Hugo Osvaldo Barrera --- protocol/wayland.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 97ad2eb2..9418c62f 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1514,9 +1514,15 @@ mutates the underlying buffer storage, the surface contents become undefined immediately. - If wl_surface.attach is sent with a NULL wl_buffer, or the pending - wl_buffer has been destroyed, the following wl_surface.commit will - remove the surface content. + If wl_surface.attach is sent with a NULL wl_buffer, the + following wl_surface.commit will remove the surface content. + + If a pending wl_buffer has been destroyed, the result is not specified. + Many compositors are known to remove the surface content on the following + wl_surface.commit, but this behaviour is not universal. Clients seeking to + maximise compatibility should not destroy pending buffers and should + ensure that they explicitly remove content from surfaces, even after + destroying buffers.