From 2aec8f59e9c02925205ec3b2a2d420b63287c7f5 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 14 Feb 2023 13:33:22 +0100 Subject: protocol: do not change pending x and y when attaching a buffer Attaching a buffer with interface version 5 requires clients to pass zero to x and y but it still affects the pending surface state. Attaching a buffer after a request to offset therefore sets the pending x and y to zero. The intent of version 5 was to allow exactly this sequence of requests to work so let's just make sure the protocol actually spells it out. Signed-off-by: Sebastian Wick --- protocol/wayland.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index f32a5a5..07cd6bc 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1442,8 +1442,9 @@ When the bound wl_surface version is 5 or higher, passing any non-zero x or y is a protocol violation, and will result in an - 'invalid_offset' error being raised. To achieve equivalent semantics, - use wl_surface.offset. + 'invalid_offset' error being raised. The x and y arguments are ignored + and do not change the pending state. To achieve equivalent semantics, + use wl_surface.offset. Surface contents are double-buffered state, see wl_surface.commit. -- cgit v1.2.1