1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00

window: impl close method on x11

This commit is contained in:
Wez Furlong 2019-09-28 21:01:18 -07:00
parent d543d07c69
commit d44f380a82

View File

@ -436,6 +436,9 @@ impl Drawable for Window {
}
impl WindowOpsMut for WindowInner {
fn close(&mut self) {
xcb::destroy_window(self.conn.conn(), self.window_id);
}
fn hide(&mut self) {}
fn show(&mut self) {
xcb::map_window(self.conn.conn(), self.window_id);
@ -454,6 +457,9 @@ impl WindowOpsMut for WindowInner {
}
impl WindowOps for Window {
fn close(&self) {
Connection::with_window_inner(self.0, |inner| inner.close());
}
fn hide(&self) {
Connection::with_window_inner(self.0, |inner| inner.hide());
}