Fix unknown cursor in layer-shell example

This commit is contained in:
emersion 2018-09-26 16:58:54 +02:00
parent 5b687b4a96
commit 9622efd6db
1 changed files with 6 additions and 0 deletions

View File

@ -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];