a0edb12cd6
A brief summary of the behavior of the tray icon: - There will only ever be one tray icon representing all windows. - Left-Click on a Tray Icon brings up the MRU window. - Right-Click on a Tray Icon brings up a Context Menu: ``` Focus Terminal ---------------- Windows --> Window ID 1 - <unnamed window> Named Window Named Window Again ``` - Focus Terminal will bring up the MRU window. - Clicking on any of the Window "names" in the submenu will summon the window. ## Settings Changes Two new global settings are introduced: `alwaysShowTrayIcon` and `minimizeToTray`. Here's a chart explaining the behavior with the two settings. | | `alwaysShowTrayIcon:true` | `alwaysShowTrayIcon:false` | |----------------------|------------------------------------------------------------------|------------------------------------------------------------------| | `minimizeToTray:true` | tray icon is always shown. minimize button will hide the window. | tray icon is always shown. minimize button will hide the window. | | `minimizeToTray:false` | tray icon is always shown. | tray icon is not shown ever. | Closes #5727 ## References [Spec for Minimize to Tray](https://github.com/microsoft/terminal/blob/main/doc/specs/%23653%20-%20Quake%20Mode/%23653%20-%20Quake%20Mode.md#minimize-to-tray) Docs PR - MicrosoftDocs/terminal#352 #10448 - My list of TODOs
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Class Name:
|
|
- SummonWindowSelectionArgs.h
|
|
|
|
Abstract:
|
|
- This is a helper class for determining which window a should be summoned when
|
|
a global hotkey is pressed. Parameters from a GlobalSummon action will be
|
|
filled in here. The Monarch will use these to find the window that matches
|
|
these args, and Summon() that Peasant.
|
|
- When the monarch finds a match, it will set FoundMatch to true. If it doesn't,
|
|
then the Monarch window might need to create a new window matching these args
|
|
instead.
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#include "SummonWindowSelectionArgs.g.h"
|
|
#include "../cascadia/inc/cppwinrt_utils.h"
|
|
|
|
namespace winrt::Microsoft::Terminal::Remoting::implementation
|
|
{
|
|
struct SummonWindowSelectionArgs : public SummonWindowSelectionArgsT<SummonWindowSelectionArgs>
|
|
{
|
|
public:
|
|
SummonWindowSelectionArgs() = default;
|
|
SummonWindowSelectionArgs(winrt::hstring name) :
|
|
_WindowName{ name } {};
|
|
|
|
WINRT_PROPERTY(winrt::hstring, WindowName);
|
|
|
|
WINRT_PROPERTY(bool, FoundMatch, false);
|
|
WINRT_PROPERTY(bool, OnCurrentDesktop, false);
|
|
WINRT_PROPERTY(SummonWindowBehavior, SummonBehavior);
|
|
|
|
WINRT_PROPERTY(Windows::Foundation::IReference<uint64_t>, WindowID);
|
|
};
|
|
}
|
|
|
|
namespace winrt::Microsoft::Terminal::Remoting::factory_implementation
|
|
{
|
|
BASIC_FACTORY(SummonWindowSelectionArgs);
|
|
}
|