-
Notifications
You must be signed in to change notification settings - Fork 909
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
Add EventLoopBuilder
#2137
Add EventLoopBuilder
#2137
Conversation
009619a
to
fbeebc2
Compare
fbeebc2
to
6afee17
Compare
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.
I'm in favor of adding something like that to give ability to opt-out form specific handling winit is performing on Wayland, like pointer grabs, extra motions, etc, etc.
, since those are mostly required for games, but certain clients don't need those, so opt-ting out when building event loop would be nice.
However I don't think that X11
and Wayland
share the same options, since those are completely different backends and you'd end up with _wayland
methods and Wayland related structs if you'd continue to use unified struct...
6afee17
to
111350a
Compare
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.
I'm not a massive fan of reflowing (doc) comments to fit what appears to be 80 columns, but that's not a hill I want to die on either. The changelog entries also look weird to me.
Should we mark the changelog entries as **Breaking: **
?
Otherwise, this looks good.
Sorry about the reflow, I've changed it back, same with the changelog entries. In lack of this style choice being automatic (rust-lang/rustfmt#3347) I just did it on instinct 🙄. I've marked the entries as breaking, well spotted! |
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.
I read the macos implementation and I only had the following remark.
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.
Fine from my side!
The extension methods not using with_
prefixes feels a bit inconsistent to me with the rest of the existing builder API in winit
.
You're right, I've changed these now |
bbd08c9
to
d3ae8e8
Compare
Thanks for the review @filnet! |
This commit adds an `EventLoopBuilder` structure to simplify event loop customization and providing options to it upon creation. It also deprecates the use of `EventLoop::with_user_event` in favor of the same method on new builder, and replaces old platforms specific extension traits with the new ones on the `EventLoopBuilder`.
e097541
to
c71d69a
Compare
The build failure is unrelated and present on master. |
The beginning of #2120.
CHANGELOG.md
if knowledge of this change could be valuable to users