aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-06-07 10:35:49 +0300
committerKirill Primak <vyivel@eclair.cafe>2023-06-07 10:35:49 +0300
commit31d958f70afa0a375d990f34cc3875e44fe7a2c7 (patch)
tree1fedc03707ffa9aa951ce02086ef3556c3b13224
parent544c0622fa32b508329d560df0222efe70417480 (diff)
cursor: fix applying hotspot offset
"On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are _decremented_ by the x and y parameters passed to the request."
-rw-r--r--types/wlr_cursor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index a3cf5183..f82d3c79 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -434,8 +434,8 @@ static void output_cursor_output_handle_surface_commit(
wl_container_of(listener, output_cursor, surface_commit);
struct wlr_surface *surface = output_cursor->surface;
- output_cursor->surface_hotspot.x += surface->current.dx;
- output_cursor->surface_hotspot.y += surface->current.dy;
+ output_cursor->surface_hotspot.x -= surface->current.dx;
+ output_cursor->surface_hotspot.y -= surface->current.dy;
output_cursor_output_commit_surface(output_cursor);
}