aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display
Commit message (Collapse)AuthorAge
...
* Switch to TOML configuration formatChristian Duerr2023-06-12
| | | | | | | | | | | | | | | This switches Alacritty's default configuration format from yaml to toml. While yaml is still supported, it is done by converting it to toml and should be removed entirely in the future. All existing features were persisted based on my testing. Behavior should not change much, though `--option` might have slightly different behavior since the entire line is not interpreted as one line of toml. A new `alacritty migrate` subcommand has been added which allows automatic migration from yaml to toml. This also could be used as a facility to automatically fix configuration file changes in the future. Closes #6592.
* Fix hyperlink preview for 2 lines terminal (#6953)Kirill Chibisov2023-05-25
| | | | The intention was to show it, however it was hidden due to wrong comparisson check.
* Fix 216-color cube generationChristian Duerr2023-05-25
| | | | | | This fixes a regression introduced in cb7ad5b which swapped the green and blue values when constructing the 216-color RGB cube. Fixes #6951.
* Switch to VTE's built-in ansi featureAnhad Singh2023-05-23
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix selection rotation on the last lineChristian Duerr2023-03-24
| | | | | | | | | | | | | This fixes an issue with terminal resizes when the selection is on the last line. Alacritty would fail to rotate lines and keep the selection in the same line index whenever the terminal line count was grown or shrunk. This issue occurred due to the range passed to the selection's rotate function still being based on the old terminal size, which caused the initial or target state of the rotation to be outside of the terminal bounds. Closes #6698.
* Fix `;` character in URI OSC 8 payloadKirill Chibisov2023-03-19
| | | | | The special character `;` can be not URL-encoded, thus it'll add extra parameter in the payload. Handle it joining extra parameters with the `;` as a separator.
* Add `window.resize_increments` config optionKirill Chibisov2023-02-18
| | | | Given how bugged the resize increments are on X11, it's better to disable it by default.
* Revert "Apply 'font.glyph_offset.y' for underline/strikeout"Kirill Chibisov2023-02-05
| | | This reverts commit d5e9d1d88317afc1f4374f2c2a7679cece14cb7b.
* Resize the window by cell dimensionsKirill Chibisov2023-02-05
| | | | | | This should resize window by cell dimensions granularity instead of using pixels. Fixes #388.
* Update winit to 0.28Kirill Chibisov2023-02-02
| | | | | | | | Fixes #6644. Fixes #6615. Fixes #6558. Fixes #6515. Fixes #3187. Fixes #62.
* Use sRGB color space for NSWindow on macOSNaru2023-01-07
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* User timer based rendering instead of vsyncKirill Chibisov2022-12-30
| | | Fixes #824.
* Apply 'font.glyph_offset.y' for underline/strikeoutKirill Chibisov2022-12-25
| | | Fixes #6561.
* Fix damage computation on boundariesKirill Chibisov2022-12-09
| | | | | Given that the Rect started to use signed integers saturating_sub became irrelevant and no clamp to zero were performed. This commit uses max instead to fix it.
* Ignore errors from swap_buffersKirill Chibisov2022-12-02
| | | | | | | | Most of them are innocent and require just swap again. It was like that before anyway due to old glutin bug in the error handling implementation where errors won't pulled on swap buffers, but old observed error was used. Fixes #6538.
* Add 'debug.renderer' config optionKirill Chibisov2022-11-28
| | | | | This should help trouble shooting the renderer being created and different renderer options to determine when something like dual-source rendering isn't working.
* Fix padding update not updating rendererChristian Duerr2022-11-28
| | | | | | | This fixes an issue where it was possible to update the padding of the terminal without actually queueing an update for the renderer projection, leading to a blurry projection. Closes #6502.
* Update glutin to 0.30.0Kirill Chibisov2022-11-03
| | | | | | | | | | | | | | | The glutin 0.30.0 update decouples glutin from winit which provides us with basis for a multithreaded renderer. This also improves robustness of our configuration picking, context creation, and surface handling. As an example we're now able to start on systems without a vsync, we don't try to build lots of contexts to check if some config works, and so on. That also brings us possibility to handle context losses, but that's a future work. Fixes #1268.
* Fix clippy warningsChristian Duerr2022-10-12
| | | | | This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
* Fix icon decoding on X11Hugal312022-10-05
| | | | | Glutin is waiting for an RGBA buffer with 8-bit depth, but our icon is 16-bit depth. So we need to normalize the color data when decoding the icon.
* Migrate from winapi to windows-syskillian2022-09-30
|
* Bump winit to 0.27.3Kirill Chibisov2022-09-15
| | | | Fixes #6324. Fixes #6313.
* Avoid text cursor location for hyperlink previewKirill Chibisov2022-09-14
| | | Fixes #6325.
* Add IPC config subcommandChristian Duerr2022-09-01
| | | | | | | | | | | | | | | | | | | | This patch adds a new mechanism for changing configuration options without editing the configuration file, by sending options to running instances through `alacritty msg`. Each window will load Alacritty's configuration file by default and then accept IPC messages for config updates using the `alacritty msg config` subcommand. By default all windows will be updated, individual windows can be addressed using `alacritty msg config --window-id "$ALACRITTY_WINDOW_ID"`. Each option will replace the config's current value and cannot be reset until Alacritty is restarted or the option is overwritten with a new value. Configuration options are passed in the format `field.subfield=value`, where `value` is interpreted as yaml. Closes #472.
* Add inline input method supportKirill Chibisov2022-08-29
| | | | | | This commit adds support for inline IME handling. It also makes the search bar use underline cursor instead of using '_' character. Fixes #1613.
* Include extra directory in crateChristian Duerr2022-08-24
| | | | | | | | | | | | | Instead of having the extra symlink in the root, this puts the symlink in the alacritty crate. Since we build the package on Linux this is not a problem and even allows us to get rid of the `alacritty.png` symlink. To avoid having complicated symlinks with regards to the windows build assets directory, it has just been removed from the `extra` directory completely. Since we only need it for building, it doesn't matter where it's located and users will never have to interact with it manually anyway. Closes #6242.
* Fix general and instance class set on window (#6276)Ulrik de Muelenaere2022-08-20
| | | | This fixes a regression introduced in 7d708d5, which caused the general and instance class to be swapped.
* Bump glutin to 0.29.1Kirill Chibisov2022-08-10
| | | | | | | | Fixes #6239. Fixes #5975. Fixes #5876. Fixes #5767. Fixes #4484. Fixes #3139.
* Fix visible regex match on tall viewportsPeter DeLong2022-07-26
| | | | | | The end of the search window is currently calculated using the viewport start instead of the end. The observed behavior is that all hinting stops suddenly after line 101. This was introduced in #6139 when the code was refactored into this file from display/content.rs.
* Fix clippy warningsChris Copeland2022-07-25
|
* Replace `map().unwrap_or()` with `map_or()`Chris Copeland2022-07-20
| | | Use a `map_or` instead of a `map().unwrap_or()` chain.
* Fix thin strokes on macOSChris Copeland2022-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the `font.use_thin_strokes` config, which only did anything on macOS and only prior to Big Sur. Instead, we will enable or disable "font smoothing" on macOS based on the `AppleFontSmoothing` user default. These changes let users get the "thin strokes" behavior by setting `AppleFontSmoothing` to 0 with: ```sh $ defaults write -g AppleFontSmoothing -int 0 ``` (Or replace `-g` with `org.alacritty` to apply this setting only to Alacritty.app, rather than the whole system.) Add a `removed` config attribute to show helpful warnings to users who are using config options that don't do anything anymore, and apply this attribute to `font.use_thin_strokes`. Bump `crossfont` to 0.5.0 to pick up the new font smoothing behavior. This release also includes a fix for a crash when trying to load a disabled font. Fixes #4616. Fixes #6108.
* Fix hyperlinks not being keyboard actionableKirill Chibisov2022-07-11
| | | | | | This fixes a typo in 694a52b which was filtering all hyperlinks, except only duplicated ones when opening them with keyboard. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add support for hyperlink escape sequenceKirill Chibisov2022-07-10
| | | | | | | This commit adds support for hyperlink escape sequence `OSC 8 ; params ; URI ST`. The configuration option responsible for those is `hints.enabled.hyperlinks`. Fixes #922.
* Fix resize on Wayland when creating new windowKirill Chibisov2022-06-29
| | | | | | | When we have currently active context when asking EGL on Wayland to create new context it'll lock the backing buffer of surface using that context. So making it non-current before-hand to prevent it. Follow-up to 90552e3.
* Fix flickering during resize on WaylandKirill Chibisov2022-06-09
| | | | | This also fixes an issue of windows not being rendered while resizing. Fixes #6069.
* Fix crash when damaging off-screen hintKirill Chibisov2022-06-06
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix a few minor clippy lintsYuri Astrakhan2022-06-02
|
* Fix Vi cursor not being damaged on scrollKirill Chibisov2022-05-26
| | | | | There's no need to damage intermediate Vi mode cursor points, since it can't change the terminal content meaning that only the previous and current vi cursor's viewport points matter to damage it properly.
* Enable damage tracking only on WaylandKirill Chibisov2022-05-20
| | | | | | | | | | Other platforms don't have such concepts in general or have them via different interfaces not related to EGL. This commit also resolves some minor clippy issues. Fixes #6051. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix cell_height of impl From<SizeInfo<f32>> for WindowSizekumattau2022-04-16
|
* Extract `SizeInfo` from alacritty_terminalKirill Chibisov2022-04-06
| | | | | The `SizeInfo` is a SizeInfo used for rendering, which contains information about padding, and such, however all the terminal need is number of visible lines and columns.
* Persist OpenGL context creation flagsKirill Chibisov2022-03-24
| | | | | | | | | | | | | This commit persists OpenGL context creation flags from previous window build attempts saving time in multiwindow context. It also creates window as srgb by default, since it's what Alacritty is rendering in. For reference [1] and [2]. Moreover the fallback for 10 bit colors is also added. [1] - https://github.com/alacritty/alacritty/issues/4939 and [2] - https://github.com/alacritty/alacritty/issues/3756. Fixes #4703.
* Add colored underline supportKirill Chibisov2022-03-16
| | | | | | | | | This commit adds support for colored underline and refines the dynamic extra storage. The extra storage now is using `Arc` making cloning it way faster compared to `Box` approach which scales really well when it comes to cloning in `Term::write_at_cursor`, since cloning `Arc` is constant time. Fixes #4142.
* Fix line indicator damage computationKirill Chibisov2022-03-10
| | | | The starting point of damage should be computed from the right side of the terminal, not from the starting point of line indicator.
* Add fallback GLES2 rendererKirill Chibisov2022-03-02
| | | | | | | | | | | | | | | | | | | | | Currently Alacritty only works on hardware which supports OpenGL 3.3 or more, which can become problematic with older devices. This patch adds a new GLES2 renderer, since it is much more widely supported, especially on weaker hardware like phones or a Raspberry Pi. While the GLES2 renderer is slower than the OpenGL 3.3+ version, it is still significantly faster than software rendering. However because of this performance difference it is only used when necessary and there should be no difference for machines supporting OpenGL 3.3+. The two renderers are largely independent and separated in the `renderer/text/glsl3` and `renderer/text/gles2` modules. Separate shaders are also required for text rendering. The rectangle rendering for underlines and the visual bell works identically for both versions, but does have some version-specific shader code. Fixes #128. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add `ToggleMaximized` key binding actionChris Copeland2022-02-27
|
* Don't load font twice during display creationKirill Chibisov2022-02-18
| | | | | This commit finishes the effort from a64553b to avoid reloading font twice during startup, since the original issue is with getting font metrics without building the glyph cache.
* Reuse Rasterizer in Display::newGreg Depoire--Ferrer2022-02-16
| | | | | | | Instead of creating a `Rasterizer` to guess the window dimensions, dropping it and then creating a new one for the glyph cache, reuse the same `Rasterizer`. This prevents the font from being loaded twice during startup.
* Clear damage rects right after drawingKirill Chibisov2022-02-11
| | | | Since we could queue damage before we get into the actual rendering we should clear it after drawing not before.