Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when a cursor is requested it first renders any Surface cursors, then it renders the named cursors giving priority to the cursors set by the
set_shape
function.surprising behaviour to me at least is, that it gives priority to Hidden and Surface cursors over the cursors set by
set_shape
, but since that also was the old behaviour i didn't change it without getting feedback first.i replaced the manual cursor cache insertion on startup (because i thought it was silly to repeat this for 34 cursors) and replaced it with a function that loads the cursors on demand.
i also changed the behaviour of
Cursor::load
, so that it first tries to load the default cursor of the theme instead of using the fallback cursor immediately.and last i also changed two calls to
Duration::from(time).as_millis()
with a direct call toTime::as_millis()
(as of Smithay/smithay@c700970).as the actual last point i also didn't know how cursors work in xwayland, so i left that largely unchanged as well.
a lot of the noise in the commit is because i changed the
set_shape()
function to take aCursorIcon
instead of aCursorShape
and removed theCursorShape
enum entirely.