diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2024-04-09 21:26:37 +0400 |
---|---|---|
committer | Kirill Chibisov <contact@kchibisov.com> | 2024-04-11 18:00:33 +0400 |
commit | 77dc09dcb035036ecec41d80ac028d9ac3d115b1 (patch) | |
tree | ea18e9344fc81f8c3d07bd4f276e085698bf782e | |
parent | d4f2f8577f763df059653dfab733dfe6ddc06913 (diff) | |
download | alacritty-77dc09dcb035036ecec41d80ac028d9ac3d115b1.tar.gz alacritty-77dc09dcb035036ecec41d80ac028d9ac3d115b1.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.
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | CONTRIBUTING.md | 7 | ||||
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | alacritty/Cargo.toml | 2 | ||||
-rw-r--r-- | alacritty_terminal/CHANGELOG.md | 13 | ||||
-rw-r--r-- | alacritty_terminal/Cargo.toml | 2 | ||||
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 32 |
7 files changed, 43 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9f0d65..e7452356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,15 @@ The sections should follow the order `Packaging`, `Added`, `Changed`, `Fixed` an The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +Notable changes to `alacritty_terminal` crate should be documented in its +[CHANGELOG](./alacritty_terminal/CHANGELOG.md). + ## 0.14.0-dev +### Fixed + +- New window sometimes being treated as focused when it's not on Wayland + ### Changed - Pressing `Alt` with unicode input will now add `ESC` like for ASCII input diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b07c02ef..f463bf9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -91,9 +91,10 @@ If any change has been made to the `config.rs` file, it should also be documente Changes compared to the latest Alacritty release which have a direct effect on the user (opposed to things like code refactorings or documentation/tests) additionally need to be documented in the -`CHANGELOG.md`. The existing entries should be used as a style guideline. The change log should be -used to document changes from a user-perspective, instead of explaining the technical background -(like commit messages). More information about Alacritty's change log format can be found +`CHANGELOG.md`. When notable change is made to `alacritty_terminal` it should be documnted in its +`CHANGELOG.md` as well. The existing entries should be used as a style guideline. The change log +should be used to document changes from a user-perspective, instead of explaining the technical +background (like commit messages). More information about Alacritty's change log format can be found [here](https://keepachangelog.com). ### Style @@ -91,7 +91,7 @@ dependencies = [ [[package]] name = "alacritty_terminal" -version = "0.22.1-dev" +version = "0.23.0-dev" dependencies = [ "base64", "bitflags 2.4.2", diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml index cbdd2b00..b305197e 100644 --- a/alacritty/Cargo.toml +++ b/alacritty/Cargo.toml @@ -12,7 +12,7 @@ rust-version = "1.70.0" [dependencies.alacritty_terminal] path = "../alacritty_terminal" -version = "0.22.1-dev" +version = "0.23.0-dev" [dependencies.alacritty_config_derive] path = "../alacritty_config_derive" diff --git a/alacritty_terminal/CHANGELOG.md b/alacritty_terminal/CHANGELOG.md new file mode 100644 index 00000000..daa6d63e --- /dev/null +++ b/alacritty_terminal/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to alacritty_terminal are documented in this file. The +sections should follow the order `Added`, `Changed`, `Deprecated`, `Fixed` and +`Removed`. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +## 0.23.0-dev + +### Changed + +- `Term<T>` is not focused by default anymore diff --git a/alacritty_terminal/Cargo.toml b/alacritty_terminal/Cargo.toml index 3c761b63..92731db7 100644 --- a/alacritty_terminal/Cargo.toml +++ b/alacritty_terminal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alacritty_terminal" -version = "0.22.1-dev" +version = "0.23.0-dev" authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"] license = "Apache-2.0" description = "Library for writing terminal emulators" 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(), } } |