mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Merge branch 'master' into seat-views
This commit is contained in:
commit
72d877658a
24 changed files with 1049 additions and 187 deletions
|
|
@ -200,9 +200,20 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
struct wlr_surface *icon = drag_icon->surface;
|
||||
struct wlr_cursor *cursor = seat->cursor->cursor;
|
||||
double icon_x = cursor->x + drag_icon->sx;
|
||||
double icon_y = cursor->y + drag_icon->sy;
|
||||
render_surface(icon, desktop, wlr_output, &now, icon_x, icon_y, 0);
|
||||
double icon_x = 0, icon_y = 0;
|
||||
if (drag_icon->is_pointer) {
|
||||
icon_x = cursor->x + drag_icon->sx;
|
||||
icon_y = cursor->y + drag_icon->sy;
|
||||
render_surface(icon, desktop, wlr_output, &now, icon_x, icon_y, 0);
|
||||
} else {
|
||||
struct wlr_touch_point *point =
|
||||
wlr_seat_touch_get_point(seat->seat, drag_icon->touch_id);
|
||||
if (point) {
|
||||
icon_x = seat->touch_x + drag_icon->sx;
|
||||
icon_y = seat->touch_y + drag_icon->sy;
|
||||
render_surface(icon, desktop, wlr_output, &now, icon_x, icon_y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue