c585a93fc9
## Summary of the Pull Request Currently, both when the tab is already closed, and when there is a request to close a tab (might be rejected), we go through the same flow in TerminalPage. This might leave the system in inconsistent state, as the side-effects of closing will persist even if the closing was aborted. This PR separates between the two flows, by introducing a CloseRequested event to the TabBase. This event is used to inform the upper tier (the terminal page) about the request and to trigger the same logic that happens when the tab is closed directly from the terminal page (e.g., by clicking close on the tab view). The Closed event will be used only to handle the actual closing of the tab. It will ensure that the tab gets removed from the terminal page if required. As a result, it a read-only pane will be closed non-interactively (aka connection exits), the tab closed flow will be invoked, and no user prompt will be shown. ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/issues/9572 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. |
||
---|---|---|
.. | ||
buffer | ||
cascadia | ||
dep | ||
host | ||
inc | ||
interactivity | ||
internal | ||
propsheet | ||
propslib | ||
renderer | ||
server | ||
terminal | ||
testlist | ||
til | ||
tools | ||
tsf | ||
types | ||
winconpty | ||
common.build.post.props | ||
common.build.pre.props | ||
common.build.tests.props | ||
ConsolePerf.regions.xml | ||
ConsolePerf.wprp | ||
cppwinrt.build.post.props | ||
cppwinrt.build.pre.props | ||
dirs | ||
project.inc | ||
project.unittest.inc | ||
StaticAnalysis.ruleset | ||
Terminal.wprp | ||
unit.tests.x64.runsettings | ||
unit.tests.x86.runsettings | ||
wap-common.build.post.props | ||
wap-common.build.pre.props |