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

refs: #3522
This commit is contained in:
Wez Furlong committed 2023-04-16 12:23:00 -07:00
1 parent 6d3dee733f
commit 7aa611f4cb
2 files changed
+11 -1

No files matched your search

+2
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
+9 -1
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)