aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r--alacritty/src/event.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index c2baddf8..462c9416 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -34,7 +34,7 @@ use alacritty_terminal::selection::{Selection, SelectionType};
use alacritty_terminal::term::search::{Match, RegexSearch};
use alacritty_terminal::term::{ClipboardType, SizeInfo, Term, TermMode};
-use crate::cli::{Options as CliOptions, TerminalOptions};
+use crate::cli::{Options as CliOptions, WindowOptions};
use crate::clipboard::Clipboard;
use crate::config::ui_config::{HintAction, HintInternalAction};
use crate::config::{self, UiConfig};
@@ -88,7 +88,7 @@ pub enum EventType {
ConfigReload(PathBuf),
Message(Message),
Scroll(Scroll),
- CreateWindow(TerminalOptions),
+ CreateWindow(WindowOptions),
BlinkCursor,
SearchNext,
}
@@ -379,9 +379,9 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon
#[cfg(not(windows))]
fn create_new_window(&mut self) {
- let mut options = TerminalOptions::default();
+ let mut options = WindowOptions::default();
if let Ok(working_directory) = foreground_process_path(self.master_fd, self.shell_pid) {
- options.working_directory = Some(working_directory);
+ options.terminal_options.working_directory = Some(working_directory);
}
let _ = self.event_proxy.send_event(Event::new(EventType::CreateWindow(options), None));
@@ -391,7 +391,7 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon
fn create_new_window(&mut self) {
let _ = self
.event_proxy
- .send_event(Event::new(EventType::CreateWindow(TerminalOptions::default()), None));
+ .send_event(Event::new(EventType::CreateWindow(WindowOptions::default()), None));
}
fn spawn_daemon<I, S>(&self, program: &str, args: I)
@@ -1040,12 +1040,13 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
EventType::Terminal(event) => match event {
TerminalEvent::Title(title) => {
if self.ctx.config.window.dynamic_title {
- self.ctx.window().set_title(&title);
+ self.ctx.window().set_title(title);
}
},
TerminalEvent::ResetTitle => {
- if self.ctx.config.window.dynamic_title {
- self.ctx.display.window.set_title(&self.ctx.config.window.title);
+ let window_config = &self.ctx.config.window;
+ if window_config.dynamic_title {
+ self.ctx.display.window.set_title(window_config.identity.title.clone());
}
},
TerminalEvent::Wakeup => *self.ctx.dirty = true,
@@ -1206,14 +1207,11 @@ impl Processor {
&mut self,
event_loop: &EventLoopWindowTarget<Event>,
proxy: EventLoopProxy<Event>,
- options: TerminalOptions,
+ options: WindowOptions,
) -> Result<(), Box<dyn Error>> {
- let mut pty_config = self.config.terminal_config.pty_config.clone();
- options.override_pty_config(&mut pty_config);
-
let window_context = WindowContext::new(
&self.config,
- &pty_config,
+ &options,
event_loop,
proxy,
#[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]