Fix #20049: Enable file drag & drop by fixing forbidden icon issue#20050
Fix #20049: Enable file drag & drop by fixing forbidden icon issue#20050qiwu-3 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (1)MSGFLT These words are not needed and should be removedlto TlggTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:qiwu-3/terminal.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/terminal/actions/runs/23844786912/attempts/1' &&
git commit -m 'Update check-spelling metadata'Warnings
|
| Count | |
|---|---|
| 1 |
See
✏️ Contributor please read this
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
- ... misspelled, then please correct them instead of using the command.
- ... names, please add them to
.github/actions/spelling/allow/names.txt. - ... APIs, you can add them to a file in
.github/actions/spelling/allow/. - ... just things you're using, please add them to an appropriate file in
.github/actions/spelling/expect/. - ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in
.github/actions/spelling/patterns/.
See the README.md in each directory for more information.
🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
If the flagged items are 🤯 false positives
If items relate to a ...
-
binary file (or some other file you wouldn't want to check at all).
Please add a file path to the
excludes.txtfile matching the containing file.File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
^refers to the file's path from the root of the repository, so^README\.md$would exclude README.md (on whichever branch you're using). -
well-formed pattern.
If you can write a pattern that would match it,
try adding it to thepatterns.txtfile.Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.
Note that patterns can't match multiline strings.
It has been open for six hours and never before reported. Were you able to reproduce the issue? Because nobody on the team is able to. Do you have a screenshot or screen recording of your fix working? Do you know that this repository does not use Is there a "you" involved in the authoring of this code at all? |
Summary of the Pull Request
This PR fixes the long-standing issue #20049 where dragging files from the desktop into Windows Terminal shows a forbidden cursor icon, while the native cmd.exe works correctly. After this fix, users can drag files directly into Terminal, and the file path will be inserted normally.
References and Relevant Issues
Closes #20049
Detailed Description of the Pull Request / Additional comments
Root Cause
The Terminal window was not registered as a valid file drop target, and the
WM_DROPFILESmessage was blocked by User Interface Privilege Isolation (UIPI), which prevented cross-permission drag-and-drop operations, resulting in a forbidden icon.Fix Implementation
DragAcceptFiles(_window.get(), TRUE)inIslandWindow::Initialize()to register the window as a file drop targetChangeWindowMessageFilter(WM_DROPFILES, MSGFLT_ADD)to allowWM_DROPFILESmessages across different permission levels#include <shellapi.h>to resolve undefined function errors// cspell:ignore MSGFLT_ADD WM_DROPFILESto fix the spelling check false positiveValidation Steps Performed
PR Checklist