1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-26 23:04:49 +03:00

move SessionTerminated to mux module

This commit is contained in:
Wez Furlong 2019-03-13 10:53:10 -07:00
parent bc313522a8
commit 6d82ee89a4
5 changed files with 15 additions and 18 deletions

View File

@ -3,9 +3,8 @@ use crate::font::{FontConfiguration, FontSystemSelection};
use crate::frontend::glium::window::GliumTerminalWindow;
use crate::frontend::guicommon::window::TerminalWindow;
use crate::frontend::guiloop::GuiSystem;
use crate::frontend::guiloop::SessionTerminated;
use crate::mux::tab::Tab;
use crate::mux::Mux;
use crate::mux::{Mux, SessionTerminated};
use crate::spawn_tab;
use failure::Error;
use glium;

View File

@ -6,10 +6,9 @@ use crate::font::FontConfiguration;
use crate::frontend::glium::glutinloop::GuiEventLoop;
use crate::frontend::guicommon::host::{HostHelper, HostImpl, TabHost};
use crate::frontend::guicommon::window::{Dimensions, TerminalWindow};
use crate::frontend::guiloop::SessionTerminated;
use crate::mux::tab::{Tab, TabId};
use crate::mux::window::WindowId;
use crate::mux::Mux;
use crate::mux::{Mux, SessionTerminated};
use crate::opengl::render::Renderer;
use glium;
use glium::glutin::dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize};

View File

@ -2,7 +2,6 @@ use crate::config::Config;
use crate::font::FontConfiguration;
use crate::mux::tab::Tab;
use crate::mux::Mux;
use crate::ExitStatus;
use failure::Error;
use promise::Executor;
use std::rc::Rc;
@ -73,14 +72,3 @@ pub trait GuiSystem {
fn gui_executor(&self) -> Box<Executor>;
}
#[derive(Debug, Fail)]
#[allow(dead_code)]
pub enum SessionTerminated {
#[fail(display = "Process exited: {:?}", status)]
ProcessStatus { status: ExitStatus },
#[fail(display = "Error: {:?}", err)]
Error { err: Error },
#[fail(display = "Window Closed")]
WindowClosed,
}

View File

@ -4,11 +4,10 @@ use crate::config::Config;
use crate::font::FontConfiguration;
use crate::frontend::guicommon::host::{HostHelper, HostImpl, TabHost};
use crate::frontend::guicommon::window::{Dimensions, TerminalWindow};
use crate::frontend::guiloop::SessionTerminated;
use crate::frontend::xwindows::x11loop::{GuiEventLoop, WindowId as X11WindowId};
use crate::mux::tab::{Tab, TabId};
use crate::mux::window::WindowId;
use crate::mux::Mux;
use crate::mux::{Mux, SessionTerminated};
use crate::opengl::render::Renderer;
use failure::Error;
use std::rc::Rc;

View File

@ -1,3 +1,4 @@
use crate::ExitStatus;
use failure::Error;
use promise::{Executor, Future};
use std::cell::{Ref, RefCell, RefMut};
@ -165,3 +166,14 @@ impl Mux {
self.tabs.borrow().is_empty()
}
}
#[derive(Debug, Fail)]
#[allow(dead_code)]
pub enum SessionTerminated {
#[fail(display = "Process exited: {:?}", status)]
ProcessStatus { status: ExitStatus },
#[fail(display = "Error: {:?}", err)]
Error { err: Error },
#[fail(display = "Window Closed")]
WindowClosed,
}