Fix hidden cursor on wayland backend

This commit is contained in:
emersion 2017-10-18 19:14:16 +02:00
parent 9129687ad6
commit 8c5a110d4c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 6 additions and 4 deletions

View File

@ -66,10 +66,12 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
} }
if (!buf) { if (!buf) {
// Hide cursor // Hide cursor
if (output->cursor_surface) {
wl_surface_destroy(output->cursor_surface); wl_surface_destroy(output->cursor_surface);
munmap(output->cursor_data, output->cursor_buf_size); munmap(output->cursor_data, output->cursor_buf_size);
output->cursor_surface = NULL; output->cursor_surface = NULL;
output->cursor_buf_size = 0; output->cursor_buf_size = 0;
}
wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x, wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x,
hotspot_y); hotspot_y);
return true; return true;