## 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
* [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.
48 lines
1.5 KiB
C
48 lines
1.5 KiB
C
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
//
|
|
// pch.h
|
|
// Header for platform projection include files
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <LibraryIncludes.h>
|
|
// This is inexplicable, but for whatever reason, cppwinrt conflicts with the
|
|
// SDK definition of this function, so the only fix is to undef it.
|
|
// from WinBase.h
|
|
// Windows::UI::Xaml::Media::Animation::IStoryboard::GetCurrentTime
|
|
#ifdef GetCurrentTime
|
|
#undef GetCurrentTime
|
|
#endif
|
|
|
|
#include <wil/cppwinrt.h>
|
|
|
|
#include <unknwn.h>
|
|
#include <winrt/Windows.Foundation.h>
|
|
#include <winrt/Windows.Foundation.Collections.h>
|
|
#include <winrt/Windows.Graphics.Display.h>
|
|
#include <winrt/windows.ui.core.h>
|
|
#include <winrt/Windows.ui.input.h>
|
|
#include <winrt/Windows.UI.Xaml.h>
|
|
#include <winrt/Windows.UI.Xaml.Automation.Peers.h>
|
|
#include <winrt/Windows.UI.Text.Core.h>
|
|
#include <winrt/Windows.UI.Xaml.Controls.h>
|
|
#include <winrt/Windows.UI.Xaml.Controls.Primitives.h>
|
|
#include <winrt/Windows.UI.Xaml.Data.h>
|
|
#include <winrt/Windows.UI.Xaml.Media.h>
|
|
#include <winrt/Windows.UI.Xaml.Media.Imaging.h>
|
|
#include <winrt/Windows.UI.Xaml.Input.h>
|
|
#include <winrt/Windows.UI.Xaml.Interop.h>
|
|
#include <winrt/Windows.ui.xaml.markup.h>
|
|
#include <winrt/Windows.ApplicationModel.DataTransfer.h>
|
|
#include <winrt/Windows.Storage.h>
|
|
|
|
#include <windows.ui.xaml.media.dxinterop.h>
|
|
|
|
#include <TraceLoggingProvider.h>
|
|
TRACELOGGING_DECLARE_PROVIDER(g_hTerminalControlProvider);
|
|
#include <telemetry/ProjectTelemetry.h>
|