diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-03-21 18:16:39 -0600 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-03-22 09:00:28 +0100 |
commit | ca016689a021da2920c6a18ad888e066c5d24129 (patch) | |
tree | cb7972058ad156bc2d09b401e3a4ebb4e06dda48 /sway/input | |
parent | 440d0bc22d57b8b0b21a8acbf127243b8d08cfae (diff) |
sway/input: fix bad position of wlr_drag
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index d940bb5d..3ae5ed6c 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -380,8 +380,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon) { case WLR_DRAG_GRAB_KEYBOARD: return; case WLR_DRAG_GRAB_KEYBOARD_POINTER: - icon->x = cursor->x; - icon->y = cursor->y; + icon->x = cursor->x + wlr_icon->surface->sx; + icon->y = cursor->y + wlr_icon->surface->sy; break; case WLR_DRAG_GRAB_KEYBOARD_TOUCH:; struct wlr_touch_point *point = @@ -389,8 +389,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon) { if (point == NULL) { return; } - icon->x = seat->touch_x; - icon->y = seat->touch_y; + icon->x = seat->touch_x + wlr_icon->surface->sx; + icon->y = seat->touch_y + wlr_icon->surface->sy; } drag_icon_damage_whole(icon); |