diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-26 10:18:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 10:18:54 -0500 |
commit | e47b8cd629f9378c74673cb577cc268667a71d1e (patch) | |
tree | f7ff9c0c51d6f44ce23f3e1a9087e3ab9cae4392 | |
parent | 5b687b4a9676448148aa8da1917b849857aae78f (diff) | |
parent | 9622efd6db2adc4c3bdfdd1ff88d2779b6fb0b1f (diff) |
Merge pull request #1264 from emersion/examples-unknown-cursor
Fix unknown cursor in layer-shell example
-rw-r--r-- | examples/layer-shell.c | 6 |
1 files changed, 6 insertions, 0 deletions
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]; |