-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Added set_minimized
and set_position
to Window
#1292
Conversation
Wayland itself doesn't have a way to set a global position of a window. This is because it was made with the idea that a screen could have arbitrary shapes. Some compositors do provide an extension to set the global position, but this is not something you can depend on. It also doesn't make much sense for tiling compositors I think. |
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 is useful functionality, and the code quality and comments look good.
A shame about the limited functionality on some platforms, but I think that supporting this on the platforms that do allow it is a clear improvement.
Removed `WindowDescriptor` addition, because winit does not allow setting the position on window creation. Also changed position in `Window` to an `Option` for the same reason.
Looks good to me. I just pushed a change that sets the position immediately on construction. This prevents the value from being None on the first schedule run. |
I still included Option because some platforms don't support window position. Although actually we could just treat that as 0,0 and call it a day. That would make the api easier to consume. Feel free to follow up if you're interested 😄 |
Added `set_minimized` and `set_position` to `Window`
@Toniman20 please respond in #2373 for the relicense to MIT/Apache 2.0. Thanks! |
No description provided.