[PR #4323] Add support for dragging and dropping paths onto the Terminal #25719

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

Original Pull Request: https://github.com/microsoft/terminal/pull/4323

State: closed
Merged: Yes


Summary of the Pull Request

I took the code from conhost that handles this and just copy-pasted it into the terminal codebase.

References

Original conhost code:
027f1228cb/src/interactivity/win32/windowproc.cpp (L854-L889)

PR Checklist

Detailed Description of the Pull Request / Additional comments

Okay it was a little more complicated than that. I had IslandWindow handle the drop, which then raises a generic event for AppHost to handle. AppHost handles this by writing the path as input to the terminal, traversing AppLogic, TerminalPage and finally landing in TermControl

Validation Steps Performed

Tested manually with both paths with and without spaces.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4323 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request I took the code from conhost that handles this and just copy-pasted it into the terminal codebase. ## References Original conhost code: https://github.com/microsoft/terminal/blob/027f1228cb92746de102f04c491ac02b98708bf2/src/interactivity/win32/windowproc.cpp#L854-L889 ## PR Checklist * [x] Closes #904 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Okay it was a little more complicated than that. I had `IslandWindow` handle the drop, which then raises a generic event for `AppHost` to handle. `AppHost` handles this by writing the path as input to the terminal, traversing `AppLogic`, `TerminalPage` and finally landing in `TermControl` ## Validation Steps Performed Tested manually with both paths with and without spaces.
claunia added the pull-request label 2026-01-31 09:11:20 +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#25719