From 258bf9be1e44d8a2fb953d727ff4ffcf9ebd6503 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 15 Nov 2022 11:56:45 +0100 Subject: compositor: drop wlr_surface.{sx,sy} 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. --- include/wlr/types/wlr_compositor.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index f3da622b..194c4e37 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -98,10 +98,6 @@ struct wlr_surface { * or something went wrong with uploading the buffer. */ struct wlr_client_buffer *buffer; - /** - * The buffer position, in surface-local units. - */ - int sx, sy; /** * The last commit's buffer damage, in buffer-local coordinates. This * contains both the damage accumulated by the client via -- cgit v1.2.3