cursor-shape: improve xcursor fallback support, and prefer CSS names

Before this patch, we used legacy X11 xcursor names, and didn't really
have any fallback handling in place (we only tried to fallback to
"xterm", regardless of which cursor shape we were trying to load).

This patch changes two things:

1. Improved fallback support. cursor_shape_to_string() now returns a
   list of strings. This allows us to have per-shape fallbacks, and any
   number of fallbacks.

2. We prefer CSS xcursor names over legacy X11 names.
This commit is contained in:
Daniel Eklöf 2024-02-29 07:54:27 +01:00
parent 6fd533ce13
commit d3b348a5b1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 53 additions and 46 deletions

View file

@ -90,6 +90,7 @@
bindings `ctrl-+` and `ctrl+-`).
* Use XRGB pixel format (instead of ARGB) when there is no
transparency.
* Prefer CSS xcursor names, and fallback to legacy X11 names.
[1526]: https://codeberg.org/dnkl/foot/issues/1526
[1528]: https://codeberg.org/dnkl/foot/issues/1528