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

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.
This commit is contained in:
Kirill Chibisov 2024-04-18 22:58:15 +04:00 committed by GitHub
parent d4f2f8577f
commit d28868855a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 23 deletions

View file

@ -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/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Notable changes to the `alacritty_terminal` crate are documented in its
[CHANGELOG](./alacritty_terminal/CHANGELOG.md).
## 0.14.0-dev ## 0.14.0-dev
### Fixed
- New window being treated as focused when it's not on Wayland
### Changed ### Changed
- Pressing `Alt` with unicode input will now add `ESC` like for ASCII input - Pressing `Alt` with unicode input will now add `ESC` like for ASCII input

View file

@ -91,10 +91,11 @@ 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 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 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 `CHANGELOG.md`. When a notable change is made to `alacritty_terminal`, it should be documented in
used to document changes from a user-perspective, instead of explaining the technical background `alacritty_terminal/CHANGELOG.md` as well. The existing entries should be used as a style guideline.
(like commit messages). More information about Alacritty's change log format can be found The change log should be used to document changes from a user-perspective, instead of explaining the
[here](https://keepachangelog.com). technical background (like commit messages) More information about Alacritty's change log format can
be found [here](https://keepachangelog.com).
### Style ### Style

2
Cargo.lock generated
View file

@ -91,7 +91,7 @@ dependencies = [
[[package]] [[package]]
name = "alacritty_terminal" name = "alacritty_terminal"
version = "0.22.1-dev" version = "0.23.0-dev"
dependencies = [ dependencies = [
"base64", "base64",
"bitflags 2.4.2", "bitflags 2.4.2",

View file

@ -12,7 +12,7 @@ rust-version = "1.70.0"
[dependencies.alacritty_terminal] [dependencies.alacritty_terminal]
path = "../alacritty_terminal" path = "../alacritty_terminal"
version = "0.22.1-dev" version = "0.23.0-dev"
[dependencies.alacritty_config_derive] [dependencies.alacritty_config_derive]
path = "../alacritty_config_derive" path = "../alacritty_config_derive"

View file

@ -0,0 +1,15 @@
# Changelog
All notable changes to alacritty_terminal are documented in this file. The
sections should follow the order `Added`, `Changed`, `Deprecated`, `Fixed` and
`Removed`.
**Breaking changes are written in bold style.**
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 0.23.0-dev
### Changed
- **`Term` is not focused by default anymore**

View file

@ -1,6 +1,6 @@
[package] [package]
name = "alacritty_terminal" name = "alacritty_terminal"
version = "0.22.1-dev" version = "0.23.0-dev"
authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"] authors = ["Christian Duerr <contact@christianduerr.com>", "Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0" license = "Apache-2.0"
description = "Library for writing terminal emulators" description = "Library for writing terminal emulators"

View file

@ -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_cols = dimensions.columns();
let num_lines = dimensions.screen_lines(); 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 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()); let tabs = TabStops::new(grid.columns());
@ -423,24 +423,24 @@ impl<T> Term<T> {
let damage = TermDamageState::new(num_cols, num_lines); let damage = TermDamageState::new(num_cols, num_lines);
Term { Term {
inactive_grid,
scroll_region,
event_proxy,
damage,
config,
grid, grid,
inactive_grid: alt, tabs,
inactive_keyboard_mode_stack: Default::default(),
keyboard_mode_stack: Default::default(),
active_charset: Default::default(), active_charset: Default::default(),
vi_mode_cursor: Default::default(), vi_mode_cursor: Default::default(),
tabs, cursor_style: Default::default(),
mode: Default::default(),
scroll_region,
colors: color::Colors::default(), colors: color::Colors::default(),
cursor_style: None,
event_proxy,
is_focused: true,
title: None,
title_stack: Default::default(), title_stack: Default::default(),
keyboard_mode_stack: Default::default(), is_focused: Default::default(),
inactive_keyboard_mode_stack: Default::default(), selection: Default::default(),
selection: None, title: Default::default(),
damage, mode: Default::default(),
config: options,
} }
} }