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 /rootston | |
parent | 65d57920e534acb231bb04964b257b2186c7ce73 (diff) |
Add wlr_output_set_cursor_surface
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index 3423d33b..f9372f7f 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -278,14 +278,18 @@ static void handle_request_set_cursor(struct wl_listener *listener, void *data) { struct roots_input *input = wl_container_of(listener, input, request_set_cursor); - //struct wlr_seat_pointer_request_set_cursor_event *event = data; + struct wlr_seat_pointer_request_set_cursor_event *event = data; + if (event->surface == NULL) { + wlr_log(L_DEBUG, "handle_request_set_cursor with NULL surface"); + return; + } + + wlr_log(L_DEBUG, "handle_request_set_cursor"); - struct wlr_xcursor_image *image = input->xcursor->images[0]; struct roots_output *output; wl_list_for_each(output, &input->server->desktop->outputs, link) { - if (!wlr_output_set_cursor(output->wlr_output, image->buffer, - image->width, image->width, image->height, - image->hotspot_x, image->hotspot_y)) { + if (!wlr_output_set_cursor_surface(output->wlr_output, + event->surface, event->hotspot_x, event->hotspot_y)) { wlr_log(L_DEBUG, "Failed to set hardware cursor"); return; } |