diff options
author | emersion <contact@emersion.fr> | 2017-10-18 19:14:16 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-10-18 19:14:16 +0200 |
commit | 8c5a110d4ca85f367a108e18968326ed4ff65ae6 (patch) | |
tree | 665fc435a8c606a6d2546e277300251391d2e860 | |
parent | 9129687ad6dcf162b3af8d91b2fc582f185d0943 (diff) |
Fix hidden cursor on wayland backend
-rw-r--r-- | backend/wayland/output.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index d308b907..e1138ee1 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -66,10 +66,12 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output, } if (!buf) { // Hide cursor - wl_surface_destroy(output->cursor_surface); - munmap(output->cursor_data, output->cursor_buf_size); - output->cursor_surface = NULL; - output->cursor_buf_size = 0; + if (output->cursor_surface) { + wl_surface_destroy(output->cursor_surface); + munmap(output->cursor_data, output->cursor_buf_size); + output->cursor_surface = NULL; + output->cursor_buf_size = 0; + } wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x, hotspot_y); return true; |