-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use feature markers during terminal-by-default handoff (#13160)
If we want to make Windows Terminal the default terminal under Windows, we'll have to make conhost "handoff" incoming connections by default. But this poses a problem: How can the seldomly updated conhost know whether the routinely updated Windows Terminal version is actually willing to accept such handoffs by default (it might be unwilling due to bugs, etc.)? This commit solves the issue by introducing: * A marker interface (`IDefaultTerminalMarker`): If it exists, Windows Terminal indicates its willingness to accept the handoff. * Turning the all-0 GUID from being synonymous for conhost, to being synonymous for "Let Windows decide". Without this we wouldn't be able to differentiate between users who consciously chose conhost as their default terminal, vs. users who want the standard behavior. Testing fallback behavior: * Install "Terminal" 1.13 * Delete the 2 keys below `HKCU\Console\%%Startup` * Enable `Feature_AttemptHandoff` in `features.xml` Return `true` from `DefaultApp::CheckShouldTerminalBeDefault` * Replace `conhost.exe` and `console.dll` with `sfpcopy` after building * Launching `cmd.exe` launches as a conhost window ✅ (because "Terminal" 1.13 lacks the marker interface) * Open properties page in `conhost.exe` "Let Windows decide" is select by default ✅ * Changing the selection writes the new value ✅ Testing the new behavior: * Delete the 2 keys below `HKCU\Console\%%Startup` * Enable `Feature_AttemptHandoff` in `features.xml` Return `true` from `DefaultApp::CheckShouldTerminalBeDefault` * Use `CLSID_WindowsTerminalConsoleDev` and `CLSID_WindowsTerminalTerminalDev` for the initialization of `TerminalDelegationPair` * Replace `conhost.exe` and `console.dll` with `sfpcopy` after building * Deploy the "Terminal Dev" package * Launching `cmd.exe` launches "Terminal Dev" ✅ (because "Terminal Dev" has the marker interface) * Open the settings tab "Let Windows decide" is select by default ✅ * Changing the selection and saving writes the new value ✅ (cherry picked from commit 1b81c65) Service-Card-Id: 82925080 Service-Version: Inbox
- Loading branch information
Showing
17 changed files
with
337 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1068,6 +1068,7 @@ ICore | |
IData | ||
IDCANCEL | ||
IDD | ||
IDefault | ||
IDesktop | ||
IDevice | ||
IDictionary | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.