From f6168c2afeece02b118b2bc43412fc3344e59028 Mon Sep 17 00:00:00 2001 From: nyorain Date: Fri, 7 Sep 2018 14:48:28 +0200 Subject: Fix #1129 and remove sx, sy from wlr_drag_icon sx, sy used to store the buffer offset of the drag surface which was then be added (by rootston) to the drag icon position. Buffer offsets are handled already in surface_intersect_output (output.c) so they were added twice for dnd surfaces. --- rootston/seat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rootston') diff --git a/rootston/seat.c b/rootston/seat.c index 9010d6e3..c11ff017 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -502,16 +502,16 @@ void roots_drag_icon_update_position(struct roots_drag_icon *icon) { struct roots_seat *seat = icon->seat; struct wlr_cursor *cursor = seat->cursor->cursor; if (wlr_icon->is_pointer) { - icon->x = cursor->x + wlr_icon->sx; - icon->y = cursor->y + wlr_icon->sy; + icon->x = cursor->x; + icon->y = cursor->y; } else { struct wlr_touch_point *point = wlr_seat_touch_get_point(seat->seat, wlr_icon->touch_id); if (point == NULL) { return; } - icon->x = seat->touch_x + wlr_icon->sx; - icon->y = seat->touch_y + wlr_icon->sy; + icon->x = seat->touch_x; + icon->y = seat->touch_y; } roots_drag_icon_damage_whole(icon); -- cgit v1.2.3