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."
master
Kirill Primak 1 year ago
parent 544c0622fa
commit 31d958f70a

@ -434,8 +434,8 @@ static void output_cursor_output_handle_surface_commit(
wl_container_of(listener, output_cursor, surface_commit); wl_container_of(listener, output_cursor, surface_commit);
struct wlr_surface *surface = output_cursor->surface; struct wlr_surface *surface = output_cursor->surface;
output_cursor->surface_hotspot.x += surface->current.dx; output_cursor->surface_hotspot.x -= surface->current.dx;
output_cursor->surface_hotspot.y += surface->current.dy; output_cursor->surface_hotspot.y -= surface->current.dy;
output_cursor_output_commit_surface(output_cursor); output_cursor_output_commit_surface(output_cursor);
} }

Loading…
Cancel
Save