PrimaryMonitor component not added to any Monitor entities
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
0.17.2
## \[Optional\] Relevant system information
Linux - Wayland
## What you did
When querying PrimaryMonitor, no entities contain component when run at the PostStartup schedule.
```Rust
pub fn detect_primary_monitor_settings(
mut commands: Commands,
q_primary_monitor: Query<(Entity, &mut PrimaryMonitor)>,
) {
for (entity, _primary_monitor) in q_primary_monitor {
commands.get_entity(entity).unwrap().log_components();
}
}
```
This snippet results in no logged components.
## What went wrong
Seems like there has been a regression, or a problem with Wayland support where Monitor entities are not being given the PrimaryMonitor component when they are the primary monitor of the system.
## Additional information
This query results in no selected entities when run at PostStartup as well
```Rust
pub fn detect_primary_monitor_settings(
mut commands: Commands,
q_primary_monitor: Query<&mut Monitor, With< PrimaryMonitor>>,
) {
for entity in q_primary_monitor {
commands.get_entity(entity).unwrap().log_components();
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.