From 52b93f7eb41bd96870c935013fe6d1e36facba5c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 2 Jun 2023 20:53:28 +0200 Subject: output/cursor: fix scale and transform Many issues here: - wlr_output_cursor_set_buffer() takes a buffer already scaled for the output, not a buffer with scale=1. - wlr_output_cursor.{width,height,hotspot_x,hotspot_y} are in output buffer coordinates. - render_cursor_buffer() had hardcoded no-ops for scale and transform, instead of using the cursor surface's. Fixes: b64e7e88bfb8 ("output: add output_cursor_set_texture()") --- include/wlr/types/wlr_output.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 267e51ef..be8253af 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -39,6 +39,8 @@ struct wlr_output_cursor { bool enabled; bool visible; uint32_t width, height; + float scale; + enum wl_output_transform transform; int32_t hotspot_x, hotspot_y; struct wlr_texture *texture; bool own_texture; -- cgit v1.2.3