bevy/crates/bevy_winit/src
charlotte 3360b45153
Expose winit's MonitorHandle (#13669)
# Objective

Adds a new `Monitor` component representing a winit `MonitorHandle` that
can be used to spawn new windows and check for system monitor
information.

Closes #12955.

## Solution

For every winit event, check available monitors and spawn them into the
world as components.

## Testing

TODO:
- [x] Test plugging in and unplugging monitor during app runtime
- [x] Test spawning a window on a second monitor by entity id
- [ ] Since this touches winit, test all platforms

---

## Changelog

- Adds a new `Monitor` component that can be queried for information
about available system monitors.

## Migration Guide

- `WindowMode` variants now take a `MonitorSelection`, which can be set
to `MonitorSelection::Primary` to mirror the old behavior.

---------

Co-authored-by: Pascal Hertleif <pascal@technocreatives.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Pascal Hertleif <killercup@gmail.com>
2024-08-06 10:54:37 +00:00
..
accessibility.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
converters.rs Expose Winit's KeyEvent::repeat in KeyboardInput (#14161) 2024-07-15 14:52:33 +00:00
lib.rs Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00
state.rs Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00
system.rs Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00
winit_config.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
winit_event.rs flush key_input cache when Bevy loses focus (Adopted) (#13678) 2024-06-05 02:06:47 +00:00
winit_monitors.rs Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00
winit_windows.rs Expose winit's MonitorHandle (#13669) 2024-08-06 10:54:37 +00:00