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. |
alice-i-cecile
left a comment
There was a problem hiding this comment.
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.