aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/window.rs
diff options
context:
space:
mode:
authorDustin <dustin1114@gmail.com>2019-10-14 13:50:58 -0400
committerChristian Duerr <contact@christianduerr.com>2019-10-14 19:50:58 +0200
commit401c2aab964b60e8c3b072e5098ba8e366d04944 (patch)
tree8b8fb2f11a93ebb3e59dedb41e01a89f30791455 /alacritty/src/window.rs
parent3475e449870b382cda4ea6d48f980577cd8c929e (diff)
downloadr-alacritty-401c2aab964b60e8c3b072e5098ba8e366d04944.tar.gz
r-alacritty-401c2aab964b60e8c3b072e5098ba8e366d04944.tar.bz2
r-alacritty-401c2aab964b60e8c3b072e5098ba8e366d04944.zip
Add support for title stack escape sequences
This commit adds the concept of a "title stack" to the terminal. Some programs (e.g. vim) send control sequences `CSI 22 ; 0` (push title) and `CSI 23 ; 0` (pop title). The title stack is just a history of previous titles. Applications can push the current title onto the stack, and pop it back off (setting the window title in the process). Fixes #2840.
Diffstat (limited to 'alacritty/src/window.rs')
-rw-r--r--alacritty/src/window.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/alacritty/src/window.rs b/alacritty/src/window.rs
index c783dc69..0394296e 100644
--- a/alacritty/src/window.rs
+++ b/alacritty/src/window.rs
@@ -31,7 +31,7 @@ use image::ImageFormat;
#[cfg(not(any(target_os = "macos", windows)))]
use x11_dl::xlib::{Display as XDisplay, PropModeReplace, XErrorEvent, Xlib};
-use alacritty_terminal::config::{Decorations, StartupMode, WindowConfig, DEFAULT_NAME};
+use alacritty_terminal::config::{Decorations, StartupMode, WindowConfig};
use alacritty_terminal::event::Event;
use alacritty_terminal::gl;
use alacritty_terminal::term::{SizeInfo, Term};
@@ -146,9 +146,7 @@ impl Window {
config: &Config,
logical: Option<LogicalSize>,
) -> Result<Window> {
- let title = config.window.title.as_ref().map_or(DEFAULT_NAME, |t| t);
-
- let window_builder = Window::get_platform_window(title, &config.window);
+ let window_builder = Window::get_platform_window(&config.window.title, &config.window);
let windowed_context =
create_gl_window(window_builder.clone(), &event_loop, false, logical)
.or_else(|_| create_gl_window(window_builder, &event_loop, true, logical))?;