aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-17 17:21:11 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-17 17:21:11 -0400
commitc00a94ca76cfc81353b78174e88539f17e9db7e0 (patch)
tree679151019b275b352f5fa776c1d0b230a88c05ba /rootston/output.c
parentb7c622a319aff00a1c825a4f16bd9443faa6b7c4 (diff)
data-device: fix drag icon position
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rootston/output.c b/rootston/output.c
index b431cbc3..f50306a3 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -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);
}