Merge branch 'jorth/toplevel-drag-set-offset' into 'main'

xdg-toplevel-drag-v1: add set_offset request

See merge request wayland/wayland-protocols!347
This commit is contained in:
Julian Orth 2026-05-10 18:33:22 +02:00
commit 7ae259e5d9

View file

@ -24,7 +24,7 @@
DEALINGS IN THE SOFTWARE.
</copyright>
<interface name="xdg_toplevel_drag_manager_v1" version="1">
<interface name="xdg_toplevel_drag_manager_v1" version="2">
<description summary="Move a window during a drag">
This protocol enhances normal drag and drop with the ability to move a
window at the same time. This allows having detachable parts of a window
@ -93,7 +93,7 @@
</request>
</interface>
<interface name="xdg_toplevel_drag_v1" version="1">
<interface name="xdg_toplevel_drag_v1" version="2">
<description summary="Object representing a toplevel move during a drag">
</description>
@ -130,6 +130,9 @@
This request can be called multiple times but issuing it while a
toplevel with an active role is attached raises a toplevel_attached
error.
Since version 2, the client must commit the toplevel after this request
for the window to start moving.
</description>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
@ -137,6 +140,20 @@
<arg name="y_offset" type="int" summary="dragged surface y offset"/>
</request>
<!-- Version 2 additions -->
<request name="set_offset" since="2">
<description summary="Change the offset hint">
This request sets the offset hint for the currently attached surface.
The hint is double-buffered state, see wl_surface.commit for details.
This request has no effect if no surface is attached.
</description>
<arg name="x_offset" type="int" summary="dragged surface x offset"/>
<arg name="y_offset" type="int" summary="dragged surface y offset"/>
</request>
</interface>
</protocol>