diff --git a/src/guiloop/x11.rs b/src/guiloop/x11.rs index 76179dbaa..03831af15 100644 --- a/src/guiloop/x11.rs +++ b/src/guiloop/x11.rs @@ -3,7 +3,7 @@ use crate::config::Config; use crate::font::FontConfiguration; use crate::futurecore; use crate::guicommon::tabs::TabId; -use crate::xwindows::xwin::TerminalWindow; +use crate::xwindows::xwin::X11TerminalWindow; use crate::xwindows::Connection; use crate::{spawn_window_impl, Child, MasterPty}; use failure::Error; @@ -69,7 +69,7 @@ impl Evented for TabEntry { #[derive(Default)] struct Windows { - by_id: HashMap, + by_id: HashMap, tab_by_id: HashMap>, } @@ -106,7 +106,7 @@ impl super::GuiSystem for X11GuiSystem { config: &Rc, fontconfig: &Rc, ) -> Result<(), Error> { - let window = TerminalWindow::new( + let window = X11TerminalWindow::new( &self.event_loop, terminal, master, @@ -199,7 +199,7 @@ impl GuiEventLoop { /// Run a function with access to the mutable version of the window with /// the specified window id - pub fn with_window Result<(), Error>>( + pub fn with_window Result<(), Error>>( &self, window_id: WindowId, func: F, @@ -257,12 +257,13 @@ impl GuiEventLoop { ) -> Result<(), Error> { let (terminal, master, child, fontconfig) = spawn_window_impl(None, config, fontconfig)?; - let window = TerminalWindow::new(event_loop, terminal, master, child, &fontconfig, config)?; + let window = + X11TerminalWindow::new(event_loop, terminal, master, child, &fontconfig, config)?; self.add_window(window) } - pub fn add_window(&self, window: TerminalWindow) -> Result<(), Error> { + pub fn add_window(&self, window: X11TerminalWindow) -> Result<(), Error> { let window_id = window.window_id(); let mut windows = self.windows.borrow_mut(); diff --git a/src/xwindows/xwin.rs b/src/xwindows/xwin.rs index 6b03f7fdc..b4161c3bf 100644 --- a/src/xwindows/xwin.rs +++ b/src/xwindows/xwin.rs @@ -35,7 +35,7 @@ struct Host { config: Rc, } -pub struct TerminalWindow { +pub struct X11TerminalWindow { host: Host, conn: Rc, fonts: Rc, @@ -48,7 +48,7 @@ pub struct TerminalWindow { } impl<'a> TabHost<'a> { - fn with_window Result<(), Error>>(&self, func: F) { + fn with_window Result<(), Error>>(&self, func: F) { let events = Rc::clone(&self.host.event_loop); let window_id = self.host.window.window.window_id; @@ -160,7 +160,7 @@ impl<'a> term::TerminalHost for TabHost<'a> { } } -impl TerminalWindow { +impl X11TerminalWindow { pub fn new( event_loop: &Rc, terminal: term::Terminal, @@ -168,7 +168,7 @@ impl TerminalWindow { process: Child, fonts: &Rc, config: &Rc, - ) -> Result { + ) -> Result { let palette = config .colors .as_ref() @@ -201,7 +201,7 @@ impl TerminalWindow { let tab = Tab::new(terminal, process, pty); - Ok(TerminalWindow { + Ok(X11TerminalWindow { host, renderer, conn: Rc::clone(&event_loop.conn), @@ -220,7 +220,10 @@ impl TerminalWindow { pub fn scaling_changed(&mut self, font_scale: Option) -> Result<(), Error> { let font_scale = font_scale.unwrap_or_else(|| self.fonts.get_font_scale()); - eprintln!("TerminalWindow::scaling_changed font_scale={}", font_scale); + eprintln!( + "X11TerminalWindow::scaling_changed font_scale={}", + font_scale + ); self.fonts.change_scaling(font_scale, 1.0);