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:
parent
fdc924bc7f
commit
2e158f58f3
@ -794,6 +794,11 @@ impl XWindow {
|
|||||||
|
|
||||||
impl XWindowInner {
|
impl XWindowInner {
|
||||||
fn close(&mut self) {
|
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);
|
xcb::destroy_window(self.conn().conn(), self.window_id);
|
||||||
}
|
}
|
||||||
fn hide(&mut self) {}
|
fn hide(&mut self) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user