mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-03 18:17:40 -06:00
Close the TermControl when closing a TerminalPaneContent (#19657)
This fixes an issue where calling close on a tab/pane won't raise a StateChange notification on the connection.
This commit is contained in:
parent
f321c30cc1
commit
a79078924a
@ -66,8 +66,12 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
void TerminalPaneContent::Close()
|
||||
{
|
||||
// We deliberately remove the event handlers before closing the control.
|
||||
// This is to prevent reentrancy issues, pointless callbacks, etc.
|
||||
_removeControlEvents();
|
||||
|
||||
_control.Close();
|
||||
|
||||
// Clear out our media player callbacks, and stop any playing media. This
|
||||
// will prevent the callback from being triggered after we've closed, and
|
||||
// also make sure that our sound stops when we're closed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user