aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display/window.rs
Commit message (Collapse)AuthorAge
* Add option to drain PTY on shutdownAndrew Borg (Kashin)2025-01-16
| | | | | This patch removes the `hold` option on `alacritty_terminal` in favor of a `drain_on_exit` option, which will drain the PTY before shutdown. The hold logic is instead handled in `alacritty`.
* Pass activation token in alacritty msg create-windowKirill Chibisov2025-01-04
| | | | Fixes #8337.
* Remove unnecessary staticsIntegral2024-12-09
|
* Add `window.level` config optionDavid Horner2024-11-23
|
* Switch to new objc2 cratesMads Marquart2024-11-21
|
* Focus new windows on macOSChris2024-11-02
|
* Fix app icon in alt+tab view on WindowsNeil Stewart2024-09-30
|
* Unify string formattingHamir Mahal2024-07-24
|
* Bump glutin to 0.32.0Kirill Chibisov2024-06-08
|
* Bump winit to 0.30.0Kirill Chibisov2024-05-04
|
* Fix replacing optional fieldsChristian Duerr2024-01-02
| | | | | | | This fixes an issue with the default `SerdeReplace` implementation where it would never recurse through options but always replace the entire option with the new value. Closes #7518.
* Keep IME always enabled on X11Kirill Chibisov2023-12-22
| | | Fixes #7195.
* Fix IME popup positioningKirill Chibisov2023-11-24
| | | | | | | | | | | | | | | | | | | When setting cursor area, the popup will be placed either above or below not obscuring the supplied region, however we were still offsetting line with `+1` putting the cursor at the bottom of the line, and given that area is from the top-left corner, the wrong area was marked for not being obscured. It was also discovered that some compositors, like GNOME, position IME in the bottom right corner of the supplied region, which is wrong, but it renders IME popup not very useful, since it's far away from the place it should be, thus try to not obscure just a few characters near the cursor. Given that X11 doesn't support area setting, it uses the old logic with offsetting. Co-developed-by: lilydjwg <lilydjwg@gmail.com> Signed-off-by: lilydjwg <lilydjwg@gmail.com>
* Fix visual bell getting stuck on macOSKirill Chibisov2023-11-13
| | | Fixes #7325.
* Add `window.blur` config optionKirill Chibisov2023-10-29
| | | Fixes #972.
* Update winit to 0.29.2 and copypasta to 0.10.0Kirill Chibisov2023-10-21
| | | | | | | | | Fixes #7236. Fixes #7201. Fixes #7146. Fixes #6848. Fixes #3601. Fixes #3108. Fixes #2453.
* Fix `window.decorations_theme_variant` reloadKirill Chibisov2023-10-15
| | | | | The live reload handling wasn't introduced when the option got added. Fixes #7295.
* Support startup notify on Wayland/X11Kirill Chibisov2023-09-04
| | | | | | | Activate a window to indicate that we want initial focus when the system uses startup notifications. Fixes #6931.
* Add bindings for macOS tabsKirill Chibisov2023-09-04
| | | | | This doesn't represnet the movement to add tabs on any other platform, unless winit could add a similar API for them.
* Update winit to 0.29.1-betaKirill Chibisov2023-09-04
| | | | | | | | Make use of new winit frame throttling mechanism used in RedrawRequested, which removes the need for having Wayland queue to ask for the frame callbacks. Fixes #7011.
* Remove winit dependency from alacritty_configMax Brunsfeld2023-08-17
|
* Update to the new winit keyboard APIKirill Chibisov2023-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main highlight of this update is that alacritty will now use new keyboard API from the winit, which resolves a lot of issues around key bindings, such as ability to bind dead keys. It also fixes long standing issues with the virtual key code bindings and make bindings in general more predictable. It also makes our default Vi key bindings fully working. Given that alacritty was using `VirtualKey` directly in the bindings from the winit, and winit simply removed the enum, we've added internal conversions to minimize the fallout, but new way to specify the bindings should be more intuitive. Other part of this update fixes some forward compatibility bugs with the Wayland backend, given that wayland-rs 0.30 is fully forward compatible. The update also fixes weird Maximized startup issues on GNOME Wayland, however they were present on any sane compositor. Fixes #6842. Fixes #6455. Fixes #6184. Fixes #5684. Fixes #3574. Fixes #3460. Fixes #1336. Fixes #892. Fixes #458. Fixes #55.
* 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.
* 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 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
|
* 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 clippy warningsChris Copeland2022-07-25
|
* 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.
* 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>
* 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 `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.
* Add damage tracking and reporting to compatible compositorsKirill Chibisov2022-02-02
| | | | | | | | | | | | | | This allows compositors to only process damaged (that is, updated) regions of our window buffer, which for larger window sizes (think 4k) should significantly reduce compositing workload under compositors that support/honor it, which is good for performance, battery life and lower latency over remote connections like VNC. On Wayland, clients are expected to always report correct damage, so this makes us a good citizen there. It can also aid remote desktop (waypipe, rdp, vnc, ...) and other types of screencopy by having damage bubble up correctly. Fixes #3186.
* Use `with_position` instead of `set_outer_position`Kirill Chibisov2022-01-11
| | | | This uses `with_position` method on a `WindowBuilder` instead of setting window position on the created window later on.
* Add title/class CLI parameters to create-windowKirill Chibisov2022-01-03
| | | | | This adds the ability to pass title and class over IPC via the create-window subcommand, so users can run only one instance for windows of different spurposes in the window managers of their choice.
* Bump glutin to 0.28.0Kirill Chibisov2021-12-03
| | | | | | | | Fixes #5603. Fixes #5422. Fixes #5350. Fixes #4105. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add parameters to `msg create-window` subcommandKirill Chibisov2021-11-22
| | | | | | | | | | | | | | | Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560.
* Add multi-window supportChristian Duerr2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
* Fix clippy warningsChristian Duerr2021-07-03
|
* Limit the maximum DPR on X11 to 10Christian Duerr2021-02-15
| | | | | | | | | | | Since there have a bunch of problems caused by an excessive DPI reported by XRandr, this limits the maximum DPR on X11 to 10. These issues would commonly cause problems like long startup times or crashes, which are hard to troubleshoot for the user. While a limit of 10 might not eliminate all of these issues, it should still make it possible for Alacritty to start to make troubleshooting simpler. Fixes #3214.
* Fix segmentation fault on shutdown with WaylandChristian Duerr2021-01-29
| | | Fixes #4702.