mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
#300, add command option -ctrl_minimize_to_tray=0 to disable the feature
This commit is contained in:
parent
8b08fb3d07
commit
006aa4e517
2 changed files with 6 additions and 1 deletions
|
@ -116,6 +116,8 @@ namespace PersistentWindows.Common
|
||||||
public bool enableDualPosSwitch = true;
|
public bool enableDualPosSwitch = true;
|
||||||
private HashSet<IntPtr> dualPosSwitchWindows = new HashSet<IntPtr>();
|
private HashSet<IntPtr> dualPosSwitchWindows = new HashSet<IntPtr>();
|
||||||
|
|
||||||
|
public bool enableMinimizeToTray = true;
|
||||||
|
|
||||||
private Dictionary<string, string> realProcessFileName = new Dictionary<string, string>()
|
private Dictionary<string, string> realProcessFileName = new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
{ "WindowsTerminal.exe", "wt.exe"},
|
{ "WindowsTerminal.exe", "wt.exe"},
|
||||||
|
@ -1574,7 +1576,7 @@ namespace PersistentWindows.Common
|
||||||
foreGroundWindow = IntPtr.Zero;
|
foreGroundWindow = IntPtr.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shift_key_pressed && !alt_key_pressed)
|
if (enableMinimizeToTray)
|
||||||
MinimizeToTray.Create(hwnd);
|
MinimizeToTray.Create(hwnd);
|
||||||
|
|
||||||
goto case User32Events.EVENT_SYSTEM_MOVESIZEEND;
|
goto case User32Events.EVENT_SYSTEM_MOVESIZEEND;
|
||||||
|
|
|
@ -184,6 +184,9 @@ namespace PersistentWindows.SystrayShell
|
||||||
case "-foreground_background_dual_position=0":
|
case "-foreground_background_dual_position=0":
|
||||||
pwp.enableDualPosSwitch = false;
|
pwp.enableDualPosSwitch = false;
|
||||||
break;
|
break;
|
||||||
|
case "-ctrl_minimize_to_tray=0":
|
||||||
|
pwp.enableMinimizeToTray = false;
|
||||||
|
break;
|
||||||
case "-prompt_session_restore":
|
case "-prompt_session_restore":
|
||||||
prompt_session_restore = true;
|
prompt_session_restore = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue