-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayland: Add relative pointer movement #973
Wayland: Add relative pointer movement #973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall, apart for the fact that it introduces a second event queue.
I think it'd be possible to refactor the WindowEventsSink
to handle both device and window events, possibly with a send_window_event
and a send_device_event
method. The main benefit we would have from this is to preserve the ordering of the events as they are received from the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, apart for the small noted nit. Thanks!
manager, | ||
) | ||
.ok() | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be simplified using Option::and_then
rather than map_or_else
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, next commit fixes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks!
* Add relative pointer movement for Wayland * Format changed code with rustfmt * Wayland: merge window and device event queues into one * Replace map_or_else call for simplification
Partially resolves #962. Added support for zwp-relative-pointer and added DeviceEventsSink in addition to existing event queue.
cargo fmt
has been run on this branchCHANGELOG.md
if knowledge of this change could be valuable to users