Avoid using duration of 0 for non-animated cursors#1
Avoid using duration of 0 for non-animated cursors#1bbb651 wants to merge 1 commit intophisch:masterfrom
Conversation
This fixes a crash with `wayland-cursor` and `anvil`, see: Smithay/smithay#1653 I'm not sure which behavior is "correct", this seems to be undocumented but this reduces possible crashes.
|
Would this even be necessary if this is also fixed in smithay? It's been a while since I read up on this, but I believed that other themes set 0 in case if there is only one single frame as well. Edit: also, I have been using this with niri, which is smithay based, for about a year now. Why does it only affect anvil? Edit 2: lets discuss this over on the smithay repo. Nobody except me uses this cursor theme builder anyway 😛 |
Niri has a check for it.
Maybe? Since it's ambiguous I imagine there are more cases, it doesn't help seemingly popular cursor themes don't do that e.g. Adwaita (based on it not triggering the crash it's annoying to check since it's a binary format and their build script is weird, I hate Xcursor). On the other hand 0 feels nicer and better communicates the intent of "not animated", and it feels like it should be a tiny bit faster in e.g. niri where there's an early exit but I imagine it's within margin of error or very negligible, would be interesting to bench. |
|
I also dislike xcursor and existing generators. That's why I wrote an encoder for this myself: https://github.com/phisch/cursor-theme-builder/blob/master/src/lib/x11/xcursor.ts The field used is called a |
This fixes a crash with
wayland-cursorandanvil, see: Smithay/smithay#1653I'm not sure which behavior is "correct", the exact behavior seems to be undocumented but this reduces possible crashes.
(I edited
action/build/dist/main.jsdirectly because it's a single character and invoking pnpm updated the lockfile version and generated a bunch of noise)