Skip to content

Commit

Permalink
Dismiss Terminal-by-default banner on handoff (#13344)
Browse files Browse the repository at this point in the history
It's not useful to notify users that WT can be made the default if it's already
clearly being used for handoff. This commit will suppresses the banner then.

## PR Checklist
* [x] Closes #13314
* [x] I work here

## Validation Steps Performed
* Modify `TerminalPage::ShowSetAsDefaultInfoBar` to not check for
  `CascadiaSettings::IsDefaultTerminalSet()`
* Set Terminal Dev as the default
* Set incoming connections to open in the latest Terminal window
* Delete `state.json` after every test below
* Launching Terminal Dev shows the banner ✅
  Launching `cmd.exe` dismisses the banner in the current Terminal ✅
* Launching `cmd.exe` launches Terminal Dev without banner ✅
  • Loading branch information
lhecker authored Jun 21, 2022
1 parent 0b97c7b commit 24a53d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3274,6 +3274,9 @@ namespace winrt::TerminalApp::implementation

// Request a summon of this window to the foreground
_SummonWindowRequestedHandlers(*this, nullptr);

const IInspectable unused{ nullptr };
_SetAsDefaultDismissHandler(unused, unused);
return S_OK;
}
CATCH_RETURN()
Expand Down

0 comments on commit 24a53d4

Please sign in to comment.