From 401c2aab964b60e8c3b072e5098ba8e366d04944 Mon Sep 17 00:00:00 2001 From: Dustin Date: Mon, 14 Oct 2019 13:50:58 -0400 Subject: 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. --- alacritty/src/window.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'alacritty/src/window.rs') 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, ) -> Result { - 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))?; -- cgit