From 000081db1960236d1dadbbd4425ce24ca311e0bd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 27 Jun 2023 10:48:24 +0200 Subject: 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 --- include/types/wlr_output.h | 5 +++-- include/wlr/types/wlr_output.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h index 22a5c463..1fbe3949 100644 --- a/include/types/wlr_output.h +++ b/include/types/wlr_output.h @@ -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 diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index f3ed7c10..1ec22cfe 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -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; -- cgit v1.2.3