Merge pull request #1264 from emersion/examples-unknown-cursor

Fix unknown cursor in layer-shell example
This commit is contained in:
Drew DeVault 2018-09-26 10:18:54 -05:00 committed by GitHub
commit e47b8cd629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -596,10 +596,16 @@ int main(int argc, char **argv) {
assert(cursor_theme); assert(cursor_theme);
struct wl_cursor *cursor = struct wl_cursor *cursor =
wl_cursor_theme_get_cursor(cursor_theme, "crosshair"); wl_cursor_theme_get_cursor(cursor_theme, "crosshair");
if (cursor == NULL) {
cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr");
}
assert(cursor); assert(cursor);
cursor_image = cursor->images[0]; cursor_image = cursor->images[0];
cursor = wl_cursor_theme_get_cursor(cursor_theme, "tcross"); cursor = wl_cursor_theme_get_cursor(cursor_theme, "tcross");
if (cursor == NULL) {
cursor = wl_cursor_theme_get_cursor(cursor_theme, "left_ptr");
}
assert(cursor); assert(cursor);
popup_cursor_image = cursor->images[0]; popup_cursor_image = cursor->images[0];