Closed falkTX closed 2 years ago
It depends on the cursor theme. In my testing, default
seemed to be the most universally present one that made sense in every environment I tried (and left_ptr
noticeably didn't work with several).
Please test proposed solutions, preferably in patch form, to the same level. Specifically:
With several cursor themes, in each, using (at least) pugl_cursor_demo
.
what about simply unsettling the cursor?
sorry I think I misunderstood. I can try the unsetting-cursor on those environments yes
I dunno. Assuming it always actually changes it to the default, sure, I guess? Point being that this stuff seems wildly inconsistent, so half-baked "works for me" guesses aren't going to cut it and it needs to be well-tested in a bunch of environments. How XCursor themes are this much of a seemingly unstandardized mess is beyond me...
Note that GLFW uses "default", although it also uses things like "ew-resize" which don't work for me with several setups.
Worst case scenario, I suppose it would be possible to try several names, but that would make the code quite a bit more complicated.
For some reason I no longer have issues regarding this with latest pugl.. Unsetting the cursor to arrow/default is working fine.
:shrug: I'll assume it's fine until proven otherwise, then.
Yes, I have not seen the issue come back yet, so we can assume it is fine.
When changing the cursor to something custom and then trying to revert back to the default,
puglSetCursor(view, PUGL_CURSOR_ARROW)
fails withPUGL_BAD_PARAMETER
. To be more precise, it fails becauseXcursorLibraryLoadImage
returns null. Happens at least with X11 with KDE, running Ubuntu/Neon 20.04.Changing "default" to "left_ptr" makes this work. So it seems to be "just" a matter of picking the correct name.
I did a quick check and passing zero/null as the cursor for
XDefineCursor
allows the cursor to revert to default. So perhaps an idea would be to simply unset the cursor entirely instead of trying to set the default one?