diff --git a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs index 7d0aa0a..dff6127 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -116,6 +116,8 @@ namespace PersistentWindows.Common public bool enableDualPosSwitch = true; private HashSet dualPosSwitchWindows = new HashSet(); + public bool enableMinimizeToTray = true; + private Dictionary realProcessFileName = new Dictionary() { { "WindowsTerminal.exe", "wt.exe"}, @@ -1574,7 +1576,7 @@ namespace PersistentWindows.Common foreGroundWindow = IntPtr.Zero; } - if (!shift_key_pressed && !alt_key_pressed) + if (enableMinimizeToTray) MinimizeToTray.Create(hwnd); goto case User32Events.EVENT_SYSTEM_MOVESIZEEND; diff --git a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs index f3f1274..7b9162c 100644 --- a/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs +++ b/Ninjacrab.PersistentWindows.Solution/SystrayShell/Program.cs @@ -184,6 +184,9 @@ namespace PersistentWindows.SystrayShell case "-foreground_background_dual_position=0": pwp.enableDualPosSwitch = false; break; + case "-ctrl_minimize_to_tray=0": + pwp.enableMinimizeToTray = false; + break; case "-prompt_session_restore": prompt_session_restore = true; break;