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:
parent
abe656f51a
commit
a63784e19a
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user