1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 11:17:15 +03:00

x11: avoid make_current assertion for wezterm connect unix

The connection UI show/close could cause an assertion/bad alloc
error when it closes.
This commit is contained in:
Wez Furlong 2021-08-08 12:27:16 -07:00
parent fdc924bc7f
commit 2e158f58f3

View File

@ -794,6 +794,11 @@ impl XWindow {
impl XWindowInner {
fn close(&mut self) {
// Remove the window from the map now, as GL state
// requires that it is able to make_current() in its
// Drop impl, and that cannot succeed after we've
// destroyed the window at the X11 level.
self.conn().windows.borrow_mut().remove(&self.window_id);
xcb::destroy_window(self.conn().conn(), self.window_id);
}
fn hide(&mut self) {}