Skip to content

protocol: Add wl_surface.offset

Jonas Ådahl requested to merge jadahl/wayland:wip/surface-offset into main

This is meant to address the issue where the call to 'wl_surface.attach' is done by e.g. Vulkan or EGL, meaning applications cannot reasonably affect the values of the offset passed as the x and y arguments.

The lack of ability to pass these is problematic when using OpenGL or Vulkan for e.g. drawing DND surfaces, as the buffer offset is used to implement the drag icon hotspots.


I have not implemented this anywhere yet, I'll gather feedback first if this is the path we want to take

My motivation fir this is to fix DND in gtk4, which currently only behaves correctly in this regard when using the non hardware accelerated cairo backend, where it uses the x/y arguments in wl_surface.attach. Using either the OpenGL or Vulkan renderer results in an incorrect hotspot for DND icon surfaces.

Edited by Jonas Ådahl

Merge request reports