[PR #9802] [MERGED] Add -ForceNoHandoff for compatibility; stop handoff for double-click launches #27758

Open
opened 2026-01-31 09:24:04 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9802
Author: @miniksa
Created: 4/14/2021
Status: Merged
Merged: 4/15/2021
Merged by: @undefined

Base: mainHead: dev/miniksa/fail_bail


📝 Commits (2)

  • d1f26b4 Add flag that will ensure we do not handoff to a registered default console. Also for a bonus, allow double-click launches or explicit command line launches of conhost.exe with a binary argument to open with the inbox one.
  • 32b6326 format!

📊 Changes

4 files changed (+130 additions, -0 deletions)

View changed files

📝 src/host/ConsoleArguments.cpp (+15 -0)
📝 src/host/ConsoleArguments.hpp (+5 -0)
📝 src/host/ut_host/ConsoleArgumentsTests.cpp (+94 -0)
📝 src/server/IoDispatchers.cpp (+16 -0)

📄 Description

Add flag that will ensure we do not handoff to a registered default console. Also for a bonus, allow double-click launches or explicit command line launches of conhost.exe with a binary argument to open with the inbox one.

PR Checklist

Validation Steps Performed

  • Automated tests for parsing
  • Enable defapp, double click conhost.exe, opens as itself
  • Enable defapp, run conhost.exe runbox, opens as itself
  • Enable defapp, run conhost.exe powershell.exe runbox, opens as itself
  • Runbox cmd.exe/pwsh.exe trigger defapp handoff to Terminal
  • Shortcut to cmd.exe/pwsh.exe trigger defapp handoff to Terminal
  • Use CHOP tool to launch conhost with a server handle triggers handoff to Terminal
  • Use CHOP tool to launch conhost with a server handle and -ForceNoHandoff opens as itself

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9802 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 4/14/2021 **Status:** ✅ Merged **Merged:** 4/15/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/miniksa/fail_bail` --- ### 📝 Commits (2) - [`d1f26b4`](https://github.com/microsoft/terminal/commit/d1f26b424e44aa1dd80df00eca98fdd1b521e4c1) Add flag that will ensure we do not handoff to a registered default console. Also for a bonus, allow double-click launches or explicit command line launches of conhost.exe with a binary argument to open with the inbox one. - [`32b6326`](https://github.com/microsoft/terminal/commit/32b6326ba402de4c97fc61fc46c229e431c6c384) format! ### 📊 Changes **4 files changed** (+130 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/host/ConsoleArguments.cpp` (+15 -0) 📝 `src/host/ConsoleArguments.hpp` (+5 -0) 📝 `src/host/ut_host/ConsoleArgumentsTests.cpp` (+94 -0) 📝 `src/server/IoDispatchers.cpp` (+16 -0) </details> ### 📄 Description Add flag that will ensure we do not handoff to a registered default console. Also for a bonus, allow double-click launches or explicit command line launches of conhost.exe with a binary argument to open with the inbox one. ## PR Checklist * [x] Closes #9791 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * [x] Automated tests for parsing * [x] Enable defapp, double click conhost.exe, opens as itself * [x] Enable defapp, run conhost.exe runbox, opens as itself * [x] Enable defapp, run conhost.exe powershell.exe runbox, opens as itself * [x] Runbox cmd.exe/pwsh.exe trigger defapp handoff to Terminal * [x] Shortcut to cmd.exe/pwsh.exe trigger defapp handoff to Terminal * [x] Use CHOP tool to launch conhost with a server handle triggers handoff to Terminal * [x] Use CHOP tool to launch conhost with a server handle and -ForceNoHandoff opens as itself --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:04 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27758