diff options
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/display.rs b/src/display.rs index 4873e02a..8266e655 100644 --- a/src/display.rs +++ b/src/display.rs @@ -140,6 +140,14 @@ impl Display { // Create the window where Alacritty will be displayed let mut window = Window::new(&options, config.window())?; + // TODO: replace `set_position` with `with_position` once available + // Upstream issue: https://github.com/tomaka/winit/issues/806 + // Set window position early so it doesn't "teleport" + let position = options.position().or_else(|| config.position()); + if let Some(position) = position { + window.set_position(position.x, position.y); + } + let dpr = window.hidpi_factor(); info!("Device pixel ratio: {}", dpr); |