Skip to content

Commit

Permalink
Dismiss flyouts before opening warning dialog when exiting app (#16075)
Browse files Browse the repository at this point in the history
Updated the function `TerminalPage::CloseWindow` to include logic for
closing context and flyout menus so that they are dismissed before the
warning is displayed.

Closes #16039
  • Loading branch information
codecruisedor authored Oct 3, 2023
1 parent 59aaba7 commit aafb917
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,11 @@ namespace winrt::TerminalApp::implementation
_settings.GlobalSettings().ConfirmCloseAllTabs() &&
!_displayingCloseDialog)
{
if (_newTabButton && _newTabButton.Flyout())
{
_newTabButton.Flyout().Hide();
}
_DismissTabContextMenus();
_displayingCloseDialog = true;
auto warningResult = co_await _ShowCloseWarningDialog();
_displayingCloseDialog = false;
Expand Down

0 comments on commit aafb917

Please sign in to comment.