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 diff --git a/types/scene/drag_icon.c b/types/scene/drag_icon.c index 8c28e1a0..15b6b45b 100644 --- a/types/scene/drag_icon.c +++ b/types/scene/drag_icon.c @@ -18,8 +18,9 @@ static void drag_icon_handle_surface_commit(struct wl_listener *listener, void * struct wlr_scene_drag_icon *icon = wl_container_of(listener, icon, drag_icon_surface_commit); struct wlr_surface *surface = icon->drag_icon->surface; - wlr_scene_node_set_position(&icon->surface_tree->node, - surface->sx, surface->sy); + struct wlr_scene_node *node = &icon->surface_tree->node; + wlr_scene_node_set_position(node, + node->x + surface->current.dx, node->y + surface->current.dy); } static void drag_icon_handle_map(struct wl_listener *listener, void *data) { @@ -74,8 +75,6 @@ struct wlr_scene_tree *wlr_scene_drag_icon_create( return NULL; } - wlr_scene_node_set_position(&icon->surface_tree->node, - drag_icon->surface->sx, drag_icon->surface->sy); wlr_scene_node_set_enabled(&icon->tree->node, drag_icon->mapped); icon->tree_destroy.notify = drag_icon_handle_tree_destroy; diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c index d5e5fd0e..3362777f 100644 --- a/types/wlr_compositor.c +++ b/types/wlr_compositor.c @@ -439,8 +439,6 @@ static void surface_commit_state(struct wlr_surface *surface, bool invalid_buffer = next->committed & WLR_SURFACE_STATE_BUFFER; - surface->sx += next->dx; - surface->sy += next->dy; surface_update_damage(&surface->buffer_damage, &surface->current, next); pixman_region32_clear(&surface->external_damage);