mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-28 17:41:38 +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>
(cherry picked from commit e2535ba547)
This commit is contained in:
committed by
Ryan C. Gordon
parent
6f8d6da77f
commit
95227e2732
@@ -274,11 +274,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