diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2024-04-18 22:58:15 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 22:58:15 +0400 |
commit | d28868855afd769209a7ac81692cdbaa67be2905 (patch) | |
tree | 996b114011236e84bb988e1bfb58fe00a21206fd /alacritty_terminal/src/term/mod.rs | |
parent | d4f2f8577f763df059653dfab733dfe6ddc06913 (diff) | |
download | alacritty-d28868855afd769209a7ac81692cdbaa67be2905.tar.gz alacritty-d28868855afd769209a7ac81692cdbaa67be2905.zip |
Fix window being focused by default
Winit explicitly states that the window is not focused by default and
the `Focused` event will deliver the state later on.
Also start adding notable changes to alacritty_terminal in its own
CHANGELOG.
Closes #7866.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index f17f7462..54b64a73 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -407,13 +407,13 @@ impl<T> Term<T> { } } - pub fn new<D: Dimensions>(options: Config, dimensions: &D, event_proxy: T) -> Term<T> { + pub fn new<D: Dimensions>(config: Config, dimensions: &D, event_proxy: T) -> Term<T> { let num_cols = dimensions.columns(); let num_lines = dimensions.screen_lines(); - let history_size = options.scrolling_history; + let history_size = config.scrolling_history; let grid = Grid::new(num_lines, num_cols, history_size); - let alt = Grid::new(num_lines, num_cols, 0); + let inactive_grid = Grid::new(num_lines, num_cols, 0); let tabs = TabStops::new(grid.columns()); @@ -423,24 +423,24 @@ impl<T> Term<T> { let damage = TermDamageState::new(num_cols, num_lines); Term { + inactive_grid, + scroll_region, + event_proxy, + damage, + config, grid, - inactive_grid: alt, + tabs, + inactive_keyboard_mode_stack: Default::default(), + keyboard_mode_stack: Default::default(), active_charset: Default::default(), vi_mode_cursor: Default::default(), - tabs, - mode: Default::default(), - scroll_region, + cursor_style: Default::default(), colors: color::Colors::default(), - cursor_style: None, - event_proxy, - is_focused: true, - title: None, title_stack: Default::default(), - keyboard_mode_stack: Default::default(), - inactive_keyboard_mode_stack: Default::default(), - selection: None, - damage, - config: options, + is_focused: Default::default(), + selection: Default::default(), + title: Default::default(), + mode: Default::default(), } } |