mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
data-device: fix drag icon position
This commit is contained in:
parent
b7c622a319
commit
c00a94ca76
3 changed files with 8 additions and 4 deletions
|
|
@ -158,10 +158,8 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
|
|||
|
||||
struct wlr_surface *icon = drag_icon->surface;
|
||||
struct wlr_cursor *cursor = server->input->cursor;
|
||||
// TODO should also use the hotspot to determine the location, but
|
||||
// hotspot is broken right now.
|
||||
double icon_x = cursor->x - icon->current->sx;
|
||||
double icon_y = cursor->y - icon->current->sy;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue