Make it easier to position multiple windows in code
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version
0.11
```ignore
`AdapterInfo { name: "Intel(R) UHD Graphics 630 (CML GT2)", vendor: 32902, device: 39880, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 23.1.8-manjaro1.1", backend: Vulkan }`
```
## What you did
I want to use a second window separate from the main window to display the inspector information, and now I am faced with several problems:
1. I want the second window to automatically be next to the main window, but I can't find any API to do that.
2. When I manually set the position of the second window, it showed up on a different screen than the one where the main window was.
Note: I have two monitor screens
## Additional information
the code:
```rust
fn toggle_inspector(
mut commands: Commands,
input: Res>,
inspector_win_query: Query, With)>,
) {
if inspector_win_query.is_empty() {
if input.just_pressed(KeyCode::F1) {
commands.spawn((
Window {
title: "检查器窗口".to_owned(),
resolution: [500., 768.].into(),
// When the position is not set, it is displayed in the same monitor as the main window, and if the position is set, it is not displayed in the same monitor
// position: WindowPosition::new(IVec2::new(1024, 0)),
..default()
},
InspectorWindow,
));
}
}
}
```
screenshot:

the result i want:

Contributor guide
Assessment
This issue has not been assessed yet.