From fceabb7e9e167e1100c244bb4f460c8a346a5478 Mon Sep 17 00:00:00 2001 From: Jonas Ådahl Date: Mon, 22 Mar 2021 08:56:30 +0100 Subject: protocol: Add wl_surface.offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is meant to address the issue where the call to 'wl_surface.attach' is done by e.g. Vulkan, meaning applications cannot affect the values of the offset passed as the x and y arguments. The lack of ability to pass these is problematic when using the Vulkan for e.g. drawing DND surfaces, as the buffer offset is used to implement the drag icon hotspots. Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/148 Signed-off-by: Jonas Ådahl Reviewed-by: Simon Ser --- protocol/wayland.xml | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'protocol') diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 029db19..675c102 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -187,7 +187,7 @@ - + A compositor. This object is a singleton global. The compositor is in charge of combining the contents of multiple @@ -1337,7 +1337,7 @@ - + A surface is a rectangular area that may be displayed on zero or more outputs, and shown any number of times at the compositor's @@ -1389,6 +1389,7 @@ + @@ -1411,7 +1412,14 @@ buffer's upper left corner, relative to the current buffer's upper left corner, in surface-local coordinates. In other words, the x and y, combined with the new surface size define in which - directions the surface's size changes. + directions the surface's size changes. Setting anything other than 0 + as x and y arguments is discouraged, and should instead be replaced + with using the separate wl_surface.offset request. + + 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. Surface contents are double-buffered state, see wl_surface.commit. @@ -1742,6 +1750,27 @@ + + + + + + The x and y arguments specify the location of the new pending + buffer's upper left corner, relative to the current buffer's upper + left corner, in surface-local coordinates. In other words, the + x and y, combined with the new surface size define in which + directions the surface's size changes. + + Surface location offset is double-buffered state, see + wl_surface.commit. + + This request is semantically equivalent to and the replaces the x and y + arguments in the wl_surface.attach request in wl_surface versions prior + to 5. See wl_surface.attach for details. + + + + -- cgit v1.2.3-70-g09d2