From 31d958f70afa0a375d990f34cc3875e44fe7a2c7 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Wed, 7 Jun 2023 10:35:49 +0300 Subject: [PATCH] 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." --- types/wlr_cursor.c | 4 ++-- 1 file 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); }