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: b64e7e88bf ("output: add output_cursor_set_texture()")
This commit is contained in:
Simon Ser 2023-06-02 20:53:28 +02:00 committed by Alexander Orzechowski
parent 09c87cec3f
commit 52b93f7eb4
2 changed files with 23 additions and 13 deletions

View file

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