iced
iced copied to clipboard
Window position does not change on startup, regardless of settings
trafficstars
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
When running a native application and trying to position the initial window in the center, it does not center the window, but instead it opens the window in the top-left corner.
view::ApplicationContext::run(Settings {
window: window::Settings {
position: window::Position::Centered,
..window::Settings::default()
},
..Default::default()
})
Relevant system specs:
- Fedora Linux 35 (fully updated as of 03-16-2022
- 2 active monitors
What is the expected behavior?
The application window should open in the center of the screen of the active monitor
Version
master
Operative System
Linux
Do you have any log output?
No response
Related to https://github.com/iced-rs/iced/pull/1440, This is not a bug in Iced. Wayland doesn't let windows request position. This might be possible if Winit were to expose a layer-shell window setting, but first, that would have to be exposed by sctk in a released version. Anyway, this issue is better placed in Winit as iced cannot do anything about it.