Expose `is_minimized` and `is_visible` from Winit
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
I think right now the only way to access those Winit APIs from Bevy is to get `NonSendMut`.
This is the only way to know if a window is minimized/maximized, since there is not even an event for them so it's not possible to just keep track of that, as far as I know.
## What solution would you like?
One or several of those:
- Have a `is_minimized`, `is_maximized`, and `is_visible` methods on `Window`, to reflect Winit's method. (note: those are not available for all platforms)
- Have a public `minimized` and `visible` field on `Window`, similar to `focused`, for minimized it could also be mutated to request minimizing/maximizing, replacing the `set_maximized`/`set_minimized` methods. (note on this: mutating this field if the request fails might lead to confusing behavior, same for visible that is not supposed to be mutated at all, right now we have similar problems with `focused` actually since a `Window` can't be put out of focus, but the field can be set to true with no consequence)
- Have events to indicate when a `Window` is maximized/minimized/visible, if Winit have those (not sure), similar to `WindowFocused`
## What alternative(s) have you considered?
Use `NonSendMut`, and potentially document it for `set_maximized`/`set_minimized` methods.
Contributor guide
Assessment
This issue has not been assessed yet.