Skip to content

Specify wl_surface.offset for toplevel-drag

Consider a horizontal toolbar with an original offset hint of 500x10:

top-drag-1.svg

If the drag hovers over an area that causes the toolbar to re-configure itself to become vertical, the previous offset hint will cause the toplevel to be significantly offset from the mouse cursor even though the drag is ongoing:

top-drag-2.svg

By using wl_surface.offset(490, -490), the application can re-position the toplevel to keep the drag area under the cursor.

Edited by Julian Orth

Merge request reports

Loading