terminal/src/cascadia/ShellExtension
hereafter fcca88ab25
make "open terminal here" context menu work for directory background (#8638)
This commit makes "Open in Windows Terminal" Context menu work again for
directory background even on system that OS fix is not applied.

This is a fallback solution to OS fixes mentioned in #6414.
While OS fix is on its way, we need a fallback that works on existing OS
versions.

The approach to this is: when no item is selected (nullptr for
IShellItemArray*), we use shell api to query the path of current active
Explorer window. A special case is handled for Windows Desktop. Once
we are able to obtain the path, we launch Windows Terminal with it.

## Validation Steps Performed
1. Right click on desktop to bring up the Context menu, pick "Open in
   Windows Terminal", verify that a terminal is opened with correct
   initial path.

2. Open a few File Explorer windows, pick any window, navigate to a
   folder, click on "Background" to bring up the context menu, click
   "Open in Windows Terminal" verify that a terminal is opened with
   correct initial path.

Closes #6414
2021-01-06 19:59:30 +00:00
..
dllmain.cpp Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
OpenTerminalHere.cpp make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
OpenTerminalHere.h make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
packages.config Update C++/WinRT to 2.0.201017.1 (#8061) 2020-10-27 20:15:30 +00:00
pch.cpp Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
pch.h Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
PlaceholderType.cpp Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
PlaceholderType.h Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
PlaceholderType.idl Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
WindowsTerminalShellExt.def Add a context menu entry to "Open Windows Terminal here" (#6100) 2020-05-28 15:42:13 +00:00
WindowsTerminalShellExt.vcxproj make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00