cursor, output: apply viewport to cursor

Instead of passing the scale, pass the source and destination
boxes.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3676
This commit is contained in:
Simon Ser 2023-06-27 10:48:24 +02:00 committed by Kirill Primak
parent 657ca2205f
commit 000081db19
4 changed files with 46 additions and 22 deletions

View file

@ -15,7 +15,8 @@ bool output_ensure_buffer(struct wlr_output *output,
struct wlr_output_state *state, bool *new_back_buffer);
bool output_cursor_set_texture(struct wlr_output_cursor *cursor,
struct wlr_texture *texture, bool own_texture, float scale,
enum wl_output_transform transform, int32_t hotspot_x, int32_t hotspot_y);
struct wlr_texture *texture, bool own_texture, const struct wlr_fbox *src_box,
int dst_width, int dst_height, enum wl_output_transform transform,
int32_t hotspot_x, int32_t hotspot_y);
#endif

View file

@ -40,7 +40,7 @@ struct wlr_output_cursor {
bool enabled;
bool visible;
uint32_t width, height;
float scale;
struct wlr_fbox src_box;
enum wl_output_transform transform;
int32_t hotspot_x, hotspot_y;
struct wlr_texture *texture;