1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix start_maximized option on X11

This commit is contained in:
Elaina Martineau 2019-03-24 18:27:34 -06:00 committed by Christian Duerr
parent 3e36d714fe
commit 022f0782e4
2 changed files with 12 additions and 2 deletions

View file

@ -47,7 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixes increase/decrease font-size keybindings on international keyboards
- On Wayland, the `--title` flag will set the Window title now
- Parsing issues with URLs starting in the first or ending in the last column
- URLs stopping at double-width characters
- Fix `start_maximized` option on X11
## Version 0.2.9

View file

@ -24,6 +24,8 @@ use glutin::{
MouseCursor, WindowBuilder, ContextTrait
};
use glutin::dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize};
#[cfg(not(any(target_os = "macos", windows)))]
use glutin::os::unix::EventsLoopExt;
use crate::cli::Options;
use crate::config::{Decorations, WindowConfig};
@ -139,6 +141,14 @@ impl Window {
.or_else(|_| create_gl_window(window_builder, &event_loop, true))?;
window.show();
// Maximize window after mapping in X11
#[cfg(not(any(target_os = "macos", windows)))]
{
if event_loop.is_x11() && window_config.start_maximized() {
window.set_maximized(true);
}
}
// Text cursor
window.set_cursor(MouseCursor::Text);
@ -263,8 +273,8 @@ impl Window {
.with_title(title)
.with_visibility(false)
.with_transparency(true)
.with_maximized(window_config.start_maximized())
.with_decorations(decorations)
.with_maximized(window_config.start_maximized())
// X11
.with_class(class.into(), DEFAULT_NAME.into())
// Wayland