Dismiss Terminal-by-default banner on handoff (#13344)

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 
This commit is contained in:
Leonard Hecker
2022-06-22 01:02:29 +02:00
committed by GitHub
parent 0b97c7b5ca
commit 24a53d4968

View File

@@ -3274,6 +3274,9 @@ namespace winrt::TerminalApp::implementation
// Request a summon of this window to the foreground // Request a summon of this window to the foreground
_SummonWindowRequestedHandlers(*this, nullptr); _SummonWindowRequestedHandlers(*this, nullptr);
const IInspectable unused{ nullptr };
_SetAsDefaultDismissHandler(unused, unused);
return S_OK; return S_OK;
} }
CATCH_RETURN() CATCH_RETURN()