diff options
author | Versus Void <versusvoid@gmail.com> | 2017-10-06 09:07:08 +0300 |
---|---|---|
committer | Versus Void <versusvoid@gmail.com> | 2017-10-06 09:07:08 +0300 |
commit | 641d08ce7eba1464c535feb04513374cde22ed17 (patch) | |
tree | 717b6aca401f982a3f7d3dfc28eac4328b2f4bf5 /include | |
parent | b2d478a4189ffd96dc6158003f5cde76b70bd368 (diff) |
Transform hotspot with cursor
Fix #188
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/wayland.h | 3 | ||||
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 3 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/backend/wayland.h b/include/backend/wayland.h index 752dab69..508a7f52 100644 --- a/include/backend/wayland.h +++ b/include/backend/wayland.h @@ -67,7 +67,8 @@ struct wlr_wl_pointer { }; void wlr_wl_registry_poll(struct wlr_wl_backend *backend); -void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output, uint32_t serial); +void wlr_wl_output_update_cursor(struct wlr_wl_backend_output *output, + uint32_t serial, int32_t hotspot_x, int32_t hotspot_y); struct wlr_wl_backend_output *wlr_wl_output_for_surface( struct wlr_wl_backend *backend, struct wl_surface *surface); diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 7ed19ed9..7d2821e0 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -10,7 +10,8 @@ struct wlr_output_impl { void (*transform)(struct wlr_output *output, enum wl_output_transform transform); bool (*set_cursor)(struct wlr_output *output, const uint8_t *buf, - int32_t stride, uint32_t width, uint32_t height); + int32_t stride, uint32_t width, uint32_t height, + int32_t hotspot_x, int32_t hotspot_y); bool (*move_cursor)(struct wlr_output *output, int x, int y); void (*destroy)(struct wlr_output *output); void (*make_current)(struct wlr_output *output); diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 3208acac..1fa6ad9e 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -45,6 +45,7 @@ struct wlr_output { bool is_sw; int32_t x, y; uint32_t width, height; + int32_t hotspot_x, hotspot_y; struct wlr_renderer *renderer; struct wlr_texture *texture; } cursor; @@ -58,7 +59,8 @@ bool wlr_output_set_mode(struct wlr_output *output, void wlr_output_transform(struct wlr_output *output, enum wl_output_transform transform); bool wlr_output_set_cursor(struct wlr_output *output, - const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height); + const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height, + int32_t hotspot_x, int32_t hotspot_y); bool wlr_output_move_cursor(struct wlr_output *output, int x, int y); void wlr_output_destroy(struct wlr_output *output); void wlr_output_effective_resolution(struct wlr_output *output, |