[PR #12389] [MERGED] Eliminate the DispatchCommon class #29012

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12389
Author: @j4james
Created: 2/5/2022
Status: Merged
Merged: 2/9/2022
Merged by: @undefined

Base: mainHead: nuke-dispatchcommon


📝 Commits (3)

  • 08e8efa Move ResizeWindow implementation into ConhostInternalGetSet.
  • 290721b Replace DispatchCommon usage with ConApi calls.
  • 3c2035d Remove the unused DispatchCommon class.

📊 Changes

14 files changed (+60 additions, -136 deletions)

View changed files

📝 src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp (+1 -1)
📝 src/host/PtySignalInputThread.cpp (+2 -3)
📝 src/host/outputStream.cpp (+44 -0)
📝 src/host/outputStream.hpp (+1 -1)
src/terminal/adapter/DispatchCommon.cpp (+0 -82)
src/terminal/adapter/DispatchCommon.hpp (+0 -33)
📝 src/terminal/adapter/InteractDispatch.cpp (+3 -4)
📝 src/terminal/adapter/adaptDispatch.cpp (+2 -2)
📝 src/terminal/adapter/adaptDispatch.hpp (+0 -1)
📝 src/terminal/adapter/conGetSet.hpp (+1 -0)
📝 src/terminal/adapter/lib/adapter.vcxproj (+0 -2)
📝 src/terminal/adapter/lib/adapter.vcxproj.filters (+0 -6)
📝 src/terminal/adapter/sources.inc (+0 -1)
📝 src/terminal/adapter/ut_adapter/adapterTest.cpp (+6 -0)

📄 Description

Summary of the Pull Request

Other than the s_ResizeWindow function, the DispatchCommon class was
just a couple of static functions indirectly calling the ConGetSet
interface. So by moving the s_ResizeWindow implementation into the
ConhostInternalGetSet class, we could easily replace all usage of
DispatchCommon with direct calls to ConGetSet.

PR Checklist

Validation Steps Performed

I've manually confirmed the resizing operations still work as expected.
The other functions are harder to test, but were trivial replacements.


🔄 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/12389 **Author:** [@j4james](https://github.com/j4james) **Created:** 2/5/2022 **Status:** ✅ Merged **Merged:** 2/9/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `nuke-dispatchcommon` --- ### 📝 Commits (3) - [`08e8efa`](https://github.com/microsoft/terminal/commit/08e8efa9446e645916db66158f1a242030ac1d94) Move ResizeWindow implementation into ConhostInternalGetSet. - [`290721b`](https://github.com/microsoft/terminal/commit/290721b99a4046482459099f8930b110632fb2fc) Replace DispatchCommon usage with ConApi calls. - [`3c2035d`](https://github.com/microsoft/terminal/commit/3c2035d71a5cf80df70e6b1ecece1066bc2c3d93) Remove the unused DispatchCommon class. ### 📊 Changes **14 files changed** (+60 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp` (+1 -1) 📝 `src/host/PtySignalInputThread.cpp` (+2 -3) 📝 `src/host/outputStream.cpp` (+44 -0) 📝 `src/host/outputStream.hpp` (+1 -1) ➖ `src/terminal/adapter/DispatchCommon.cpp` (+0 -82) ➖ `src/terminal/adapter/DispatchCommon.hpp` (+0 -33) 📝 `src/terminal/adapter/InteractDispatch.cpp` (+3 -4) 📝 `src/terminal/adapter/adaptDispatch.cpp` (+2 -2) 📝 `src/terminal/adapter/adaptDispatch.hpp` (+0 -1) 📝 `src/terminal/adapter/conGetSet.hpp` (+1 -0) 📝 `src/terminal/adapter/lib/adapter.vcxproj` (+0 -2) 📝 `src/terminal/adapter/lib/adapter.vcxproj.filters` (+0 -6) 📝 `src/terminal/adapter/sources.inc` (+0 -1) 📝 `src/terminal/adapter/ut_adapter/adapterTest.cpp` (+6 -0) </details> ### 📄 Description ## Summary of the Pull Request Other than the `s_ResizeWindow` function, the `DispatchCommon` class was just a couple of static functions indirectly calling the `ConGetSet` interface. So by moving the `s_ResizeWindow` implementation into the `ConhostInternalGetSet` class, we could easily replace all usage of `DispatchCommon` with direct calls to `ConGetSet`. ## PR Checklist * [x] Closes #12253 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. Issue number where discussion took place: #12253 ## Validation Steps Performed I've manually confirmed the resizing operations still work as expected. The other functions are harder to test, but were trivial replacements. --- <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:32:15 +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#29012