mirror of
https://github.com/wez/wezterm.git
synced 2024-12-28 07:55:03 +03:00
minor tidy up of gluimwindows dead code
This commit is contained in:
parent
d95da9c159
commit
6c32efe76e
@ -1,12 +1,9 @@
|
|||||||
//! Generic system dependent windows via glium+glutin
|
//! Generic system dependent windows via glium+glutin
|
||||||
#![allow(dead_code)]
|
|
||||||
|
|
||||||
use super::spawn_window;
|
|
||||||
use clipboard::{Clipboard, ClipboardImpl, Paste};
|
use clipboard::{Clipboard, ClipboardImpl, Paste};
|
||||||
use config::Config;
|
use config::Config;
|
||||||
use failure::Error;
|
use failure::Error;
|
||||||
use font::FontConfiguration;
|
use font::FontConfiguration;
|
||||||
use futures;
|
|
||||||
use glium;
|
use glium;
|
||||||
use glium::glutin::{self, ElementState, MouseCursor};
|
use glium::glutin::{self, ElementState, MouseCursor};
|
||||||
use guiloop::{GuiEventLoop, SessionTerminated};
|
use guiloop::{GuiEventLoop, SessionTerminated};
|
||||||
@ -16,7 +13,7 @@ use pty::MasterPty;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::os::unix::io::{AsRawFd, RawFd};
|
use std::os::unix::io::{AsRawFd, RawFd};
|
||||||
use std::process::{Child, Command, ExitStatus};
|
use std::process::{Child, Command};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use term::KeyCode;
|
use term::KeyCode;
|
||||||
use term::KeyModifiers;
|
use term::KeyModifiers;
|
||||||
@ -76,6 +73,8 @@ impl term::TerminalHost for Host {
|
|||||||
|
|
||||||
fn new_window(&mut self) {
|
fn new_window(&mut self) {
|
||||||
/*
|
/*
|
||||||
|
use super::spawn_window;
|
||||||
|
use futures;
|
||||||
println!("open a new one!");
|
println!("open a new one!");
|
||||||
let event_loop = Rc::clone(&self.event_loop);
|
let event_loop = Rc::clone(&self.event_loop);
|
||||||
let config = Rc::clone(&self.config);
|
let config = Rc::clone(&self.config);
|
||||||
@ -93,8 +92,8 @@ impl term::TerminalHost for Host {
|
|||||||
|
|
||||||
pub struct TerminalWindow {
|
pub struct TerminalWindow {
|
||||||
host: Host,
|
host: Host,
|
||||||
event_loop: Rc<GuiEventLoop>,
|
_event_loop: Rc<GuiEventLoop>,
|
||||||
config: Rc<Config>,
|
_config: Rc<Config>,
|
||||||
renderer: Renderer,
|
renderer: Renderer,
|
||||||
width: u16,
|
width: u16,
|
||||||
height: u16,
|
height: u16,
|
||||||
@ -161,8 +160,8 @@ impl TerminalWindow {
|
|||||||
|
|
||||||
Ok(TerminalWindow {
|
Ok(TerminalWindow {
|
||||||
host,
|
host,
|
||||||
event_loop: Rc::clone(event_loop),
|
_event_loop: Rc::clone(event_loop),
|
||||||
config: Rc::clone(config),
|
_config: Rc::clone(config),
|
||||||
renderer,
|
renderer,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
@ -604,10 +603,6 @@ impl TerminalWindow {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn need_paint(&self) -> bool {
|
|
||||||
self.terminal.has_dirty_lines()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn test_for_child_exit(&mut self) -> Result<(), SessionTerminated> {
|
pub fn test_for_child_exit(&mut self) -> Result<(), SessionTerminated> {
|
||||||
match self.process.try_wait() {
|
match self.process.try_wait() {
|
||||||
Ok(Some(status)) => Err(SessionTerminated::ProcessStatus { status }),
|
Ok(Some(status)) => Err(SessionTerminated::ProcessStatus { status }),
|
||||||
|
Loading…
Reference in New Issue
Block a user