From 9622efd6db2adc4c3bdfdd1ff88d2779b6fb0b1f Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 26 Sep 2018 16:58:54 +0200 Subject: [PATCH] Fix unknown cursor in layer-shell example --- examples/layer-shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/layer-shell.c b/examples/layer-shell.c index f56825c3..114b98f6 100644 --- a/examples/layer-shell.c +++ b/examples/layer-shell.c @@ -596,10 +596,16 @@ int main(int argc, char **argv) { assert(cursor_theme); struct wl_cursor *cursor = wl_cursor_theme_get_cursor(cursor_theme, "crosshair"); + if (cursor == NULL) { + cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr"); + } assert(cursor); cursor_image = cursor->images[0]; cursor = wl_cursor_theme_get_cursor(cursor_theme, "tcross"); + if (cursor == NULL) { + cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr"); + } assert(cursor); popup_cursor_image = cursor->images[0];