mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
wayland: Use CSS/freedesktop cursor name "default" as a fallback
The "left_ptr" name is an X11 thing, and there's no guarantee that Wayland cursor themes contain it. In particular, GNOME's Adwaita theme as of version 46.beta only contains the CSS/freedesktop names. To test, either move one of the known cursors out of the way, or edit the switch statement above to use a wrong name for one of them. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:

committed by
Ryan C. Gordon

parent
791646535a
commit
40a6c1c0a7
@@ -400,11 +400,15 @@ static SDL_bool wayland_get_system_cursor(SDL_VideoData *vdata, Wayland_CursorDa
|
||||
}
|
||||
|
||||
/* Fallback to the default cursor if the chosen one wasn't found */
|
||||
if (!cursor) {
|
||||
cursor = WAYLAND_wl_cursor_theme_get_cursor(theme, "default");
|
||||
}
|
||||
/* Try the old X11 name as a last resort */
|
||||
if (!cursor) {
|
||||
cursor = WAYLAND_wl_cursor_theme_get_cursor(theme, "left_ptr");
|
||||
if (!cursor) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
}
|
||||
if (!cursor) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* ... Set the cursor data, finally. */
|
||||
|
Reference in New Issue
Block a user