Skip to content
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

Merged

Conversation

Cherser-s
Copy link
Contributor

@Cherser-s Cherser-s commented Jun 23, 2019

Partially resolves #962. Added support for zwp-relative-pointer and added DeviceEventsSink in addition to existing event queue.

  • Tested on all platforms changed
  • cargo fmt has been run on this branch
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented
  • Added pointer constraints support

Copy link
Contributor

@elinorbgr elinorbgr left a 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.

Copy link
Contributor

@elinorbgr elinorbgr left a 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()
},
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@elinorbgr elinorbgr left a 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!

@goddessfreya goddessfreya merged commit 3555de1 into rust-windowing:master Jun 25, 2019
kosyak pushed a commit to kosyak/winit that referenced this pull request Jul 10, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add pointer grab for Wayland
3 participants