diff options
author | emersion <contact@emersion.fr> | 2017-10-08 21:21:06 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-10-08 21:21:06 +0200 |
commit | 9b83caa658de2b51e36266beac048c96a556037c (patch) | |
tree | 095fbf13db83522e05a1a4d96992cedc62615c8a /backend | |
parent | 65d57920e534acb231bb04964b257b2186c7ce73 (diff) |
Add wlr_output_set_cursor_surface
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/output.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 062a91a1..03b43b35 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -55,9 +55,15 @@ static void wlr_wl_output_transform(struct wlr_output *_output, static bool wlr_wl_output_set_cursor(struct wlr_output *_output, const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x, int32_t hotspot_y) { - struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output; struct wlr_wl_backend *backend = output->backend; + + if (!buf) { + wl_pointer_set_cursor(output->backend->pointer, output->enter_serial, + NULL, 0, 0); + return true; + } + stride *= 4; // stride is given in pixels, we need it in bytes if (!backend->shm || !backend->pointer) { |