Fix hiding cursor hiding on wayland #2274
Merged
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.
Fixes #2273.
The underlying method for hiding the cursor (setting its texuture to
NULL) is
wayland_client::protocol::wl_pointer::WlPointer::set_cursor()
.This method expects a serial number of the last enter event.
Right now,
latest_event
is any latest pointer event. It gets used bythe call to
set_cursor()
and also tostart_interactive_move()
. Whileset_cursor()
expects the latest enter event,start_interactive_move()
expects the very latest serial from any event. Thus we need to track
both.
After this change, both serials are tracked and the appropriate is used
in the call into smithay-client-toolkit.
Tested on sway and gnome (on sway it already worked before the change).
See also #2273.
CHANGELOG.md
if knowledge of this change could be valuable to users none: bugfix