Skip to content

compositor: drop wlr_surface.{sx,sy}

Simon Ser requested to merge emersion/wlroots:drop-surface-acc-offset into master

The concept of a persistent accumulated surface offset is wrong from a protocol point-of-view. wl_surface.offset is tied to a commit, its interpretation depends on the surface role.

For example, with the following sequence:

wl_surface@1.offset(1, 1)
wl_surface@1.commit()
wl_pointer@2.set_cursor(wl_surface@1, 42, 42)

The final cursor hotspot is (42, 42): the commit which happened before the set_cursor request has no impact on the hotspot computation.

The wlr_output_cursor logic already uses wlr_surface.current.{dx,dy}. wlr_scene's drag icon doesn't, update it accordingly.


Breaking change: wlr_surface.{sx,sy} have been dropped, compositors should use wlr_surface.current.{dx,dy} in their commit handler instead.

Merge request reports

Loading