1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 14:22:37 +03:00

windows: fix linger wezterm-gui when closing with overlay active

refs: #3522
This commit is contained in:
Wez Furlong 2023-04-16 12:23:00 -07:00
parent 6d3dee733f
commit 7aa611f4cb
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 11 additions and 1 deletions

View File

@ -41,6 +41,8 @@ As features stabilize some brief notes about them will accumulate here.
sequences from a `format-tab-title` event handler. #3481
* Windows: clicking the maximize button didn't work unless using
integrated titlebar buttons. #3499
* Windows: closing a window while the debug overlay was active could
leave a lingering wezterm-gui.exe running. #3522
### 20230408-112425-69ae8472

View File

@ -869,7 +869,15 @@ impl TermWindow {
) -> anyhow::Result<bool> {
log::debug!("{event:?}");
match event {
WindowEvent::Destroyed => Ok(false),
WindowEvent::Destroyed => {
// Ensure that we cancel any overlays we had running, so
// that the mux can empty out, otherwise the mux keeps
// the TermWindow alive via the frontend even though
// the window is gone and we'll linger forever.
// <https://github.com/wez/wezterm/issues/3522>
self.clear_all_overlays();
Ok(false)
}
WindowEvent::CloseRequested => {
self.close_requested(window);
Ok(true)