terminal/src/cascadia/WindowsTerminal
Mike Griese a14b6f89f6
Combine progress states in the tab, taskbar (#10755)
## Summary of the Pull Request
![background-progress-000](https://user-images.githubusercontent.com/18356694/126653006-3ad2fdae-67ae-4cdb-aa46-25d09217e365.gif)

This PR causes the Terminal to combine taskbar states at the tab and window level, according to the [MSDN docs for `SetProgressState`](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressstate#how-the-taskbar-button-chooses-the-progress-indicator-for-a-group). 

This allows the Terminal's taskbar icon to continue showing progress information, even if you're in a pane/tab that _doesn't_ have progress state. This is helpful for cases where the user may be running a build in one tab, and working on something else in another.

## References

* [`SetProgressState`](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-itaskbarlist3-setprogressstate#how-the-taskbar-button-chooses-the-progress-indicator-for-a-group)
* Progress mega: #6700 

## PR Checklist
* [x] Closes #10090
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

This also fixes a related bug where transitioning from the "error" or "warning" state directly to the "indeterminate" state would cause the taskbar icon to get stuck in a bad state.

## Validation Steps Performed

<details>
<summary><code>progress.cmd</code></summary>

```cmd
@echo off
setlocal enabledelayedexpansion

set _type=3
if (%1) == () (
    set _type=3
) else (
    set _type=%1
)



if (%_type%) == (0) (
    <NUL set /p =]9;4
    echo Cleared progress
)
if (%_type%) == (1) (
    <NUL set /p =]9;4;1;25
    echo Started progress (normal, 25^)
)
if (%_type%) == (2) (
    <NUL set /p =]9;4;2;50
    echo Started progress (error, 50^)
)
if (%_type%) == (3) (
    @rem start indeterminate progress in the taskbar
    @rem this `<NUL set /p =` magic will output the text _without a newline_

    <NUL set /p =]9;4;3
    echo Started progress (indeterminate, {omitted})
)
if (%_type%) == (4) (
    <NUL set /p =]9;4;4;75
    echo Started progress (warning, 75^)
)

```

</details>
2021-08-10 11:16:17 +00:00
..
AppHost.cpp Combine progress states in the tab, taskbar (#10755) 2021-08-10 11:16:17 +00:00
AppHost.h Introduce vk() and sc() key chord specifiers (#10666) 2021-07-20 22:34:51 +00:00
BaseWindow.h Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
CustomWindowMessages.h Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
icon.cpp Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
icon.h Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
IslandWindow.cpp Combine progress states in the tab, taskbar (#10755) 2021-08-10 11:16:17 +00:00
IslandWindow.h Account for the window frame when calculating initial position (#10902) 2021-08-09 18:27:20 +00:00
main.cpp Add support for running a commandline in another WT window (#8898) 2021-02-10 11:28:09 +00:00
NonClientIslandWindow.cpp Account for the window frame when calculating initial position (#10902) 2021-08-09 18:27:20 +00:00
NonClientIslandWindow.h Account for the window frame when calculating initial position (#10902) 2021-08-09 18:27:20 +00:00
packages.config Update Xaml Toolkit App Host to 6.1.3 (#10640) 2021-07-12 22:58:02 +00:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
resource.h Update WT's icon at runtime to match high-contrast as applicable (#7971) 2020-10-28 00:39:38 +00:00
VirtualDesktopUtils.cpp Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
VirtualDesktopUtils.h Add desktop param to globalSummon; set _quake = toCurrent (#9954) 2021-04-28 17:25:48 -05:00
WindowsTerminal.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
WindowsTerminal.manifest Restore embedded manifests to say 18362 (#10370) 2021-06-09 16:23:26 +00:00
WindowsTerminal.rc Update WT's icon at runtime to match high-contrast as applicable (#7971) 2020-10-28 00:39:38 +00:00
WindowsTerminal.vcxproj Update Xaml Toolkit App Host to 6.1.3 (#10640) 2021-07-12 22:58:02 +00:00