diff options
author | 2022-03-21 18:16:39 -0600 | |
---|---|---|
committer | 2022-03-22 09:00:28 +0100 | |
commit | ca016689a021da2920c6a18ad888e066c5d24129 (patch) | |
tree | cb7972058ad156bc2d09b401e3a4ebb4e06dda48 | |
parent | sway/input: follow up wlroots input device events renaming (diff) | |
download | sway-ca016689a021da2920c6a18ad888e066c5d24129.tar.gz sway-ca016689a021da2920c6a18ad888e066c5d24129.tar.zst sway-ca016689a021da2920c6a18ad888e066c5d24129.zip |
sway/input: fix bad position of wlr_drag
-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) { | |||
380 | case WLR_DRAG_GRAB_KEYBOARD: | 380 | case WLR_DRAG_GRAB_KEYBOARD: |
381 | return; | 381 | return; |
382 | case WLR_DRAG_GRAB_KEYBOARD_POINTER: | 382 | case WLR_DRAG_GRAB_KEYBOARD_POINTER: |
383 | icon->x = cursor->x; | 383 | icon->x = cursor->x + wlr_icon->surface->sx; |
384 | icon->y = cursor->y; | 384 | icon->y = cursor->y + wlr_icon->surface->sy; |
385 | break; | 385 | break; |
386 | case WLR_DRAG_GRAB_KEYBOARD_TOUCH:; | 386 | case WLR_DRAG_GRAB_KEYBOARD_TOUCH:; |
387 | struct wlr_touch_point *point = | 387 | struct wlr_touch_point *point = |
@@ -389,8 +389,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon) { | |||
389 | if (point == NULL) { | 389 | if (point == NULL) { |
390 | return; | 390 | return; |
391 | } | 391 | } |
392 | icon->x = seat->touch_x; | 392 | icon->x = seat->touch_x + wlr_icon->surface->sx; |
393 | icon->y = seat->touch_y; | 393 | icon->y = seat->touch_y + wlr_icon->surface->sy; |
394 | } | 394 | } |
395 | 395 | ||
396 | drag_icon_damage_whole(icon); | 396 | drag_icon_damage_whole(icon); |