1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

fix linux compilation

This commit is contained in:
Wez Furlong 2019-06-11 08:45:01 -07:00
parent abe656f51a
commit a63784e19a
2 changed files with 7 additions and 9 deletions

View File

@ -7,7 +7,7 @@ use crate::frontend::FrontEnd;
use crate::mux::tab::Tab;
use crate::mux::window::WindowId as MuxWindowId;
use crate::mux::Mux;
use failure::{bail, Error};
use failure::{bail, Error, Fallible};
use log::debug;
use mio::{Events, Poll, PollOpt, Ready, Token};
use mio_extras::channel::{channel, Receiver as GuiReceiver, Sender as GuiSender};
@ -79,17 +79,16 @@ impl FrontEnd for X11FrontEnd {
fn run_forever(&self) -> Result<(), Error> {
self.event_loop.run()
}
fn spawn_new_window(
&self,
config: &Arc<Config>,
fontconfig: &Rc<FontConfiguration>,
tab: &Rc<dyn Tab>,
) -> Result<MuxWindowId, Error> {
let window = X11TerminalWindow::new(&self.event_loop, fontconfig, config, tab)?;
let id = window.get_mux_window_id();
self.event_loop.add_window(window)?;
Ok(id)
window_id: MuxWindowId,
) -> Fallible<()> {
let window = X11TerminalWindow::new(&self.event_loop, fontconfig, config, tab, window_id)?;
self.event_loop.add_window(window)
}
}

View File

@ -116,6 +116,7 @@ impl X11TerminalWindow {
fonts: &Rc<FontConfiguration>,
config: &Arc<Config>,
tab: &Rc<dyn Tab>,
mux_window_id: WindowId,
) -> Result<X11TerminalWindow, Error> {
let (physical_rows, physical_cols) = tab.renderer().physical_dimensions();
@ -141,8 +142,6 @@ impl X11TerminalWindow {
});
let renderer = Renderer::new(&host.window, width, height, fonts)?;
let mux = Mux::get().unwrap();
let mux_window_id = mux.add_new_window_with_tab(tab)?;
host.window.show();
Ok(X11TerminalWindow {