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."
This commit is contained in:
Kirill Primak 2023-06-07 10:35:49 +03:00
parent 544c0622fa
commit 31d958f70a
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}