mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
sway/input: fix bad position of wlr_drag
This commit is contained in:
parent
440d0bc22d
commit
ca016689a0
|
@ -380,8 +380,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon) {
|
||||||
case WLR_DRAG_GRAB_KEYBOARD:
|
case WLR_DRAG_GRAB_KEYBOARD:
|
||||||
return;
|
return;
|
||||||
case WLR_DRAG_GRAB_KEYBOARD_POINTER:
|
case WLR_DRAG_GRAB_KEYBOARD_POINTER:
|
||||||
icon->x = cursor->x;
|
icon->x = cursor->x + wlr_icon->surface->sx;
|
||||||
icon->y = cursor->y;
|
icon->y = cursor->y + wlr_icon->surface->sy;
|
||||||
break;
|
break;
|
||||||
case WLR_DRAG_GRAB_KEYBOARD_TOUCH:;
|
case WLR_DRAG_GRAB_KEYBOARD_TOUCH:;
|
||||||
struct wlr_touch_point *point =
|
struct wlr_touch_point *point =
|
||||||
|
@ -389,8 +389,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon) {
|
||||||
if (point == NULL) {
|
if (point == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
icon->x = seat->touch_x;
|
icon->x = seat->touch_x + wlr_icon->surface->sx;
|
||||||
icon->y = seat->touch_y;
|
icon->y = seat->touch_y + wlr_icon->surface->sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
drag_icon_damage_whole(icon);
|
drag_icon_damage_whole(icon);
|
||||||
|
|
Loading…
Reference in a new issue