mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Do not show CmdPal on startup (#38027)
Adds a command line arg to not show CmdPal on startup. When starting from PT Run, we won't immediately show the window. as noted in #37908
This commit is contained in:
@@ -64,7 +64,23 @@ public partial class App : Application
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||
{
|
||||
AppWindow = new MainWindow();
|
||||
AppWindow.Activate();
|
||||
|
||||
var cmdArgs = Environment.GetCommandLineArgs();
|
||||
|
||||
bool runFromPT = false;
|
||||
foreach (var arg in cmdArgs)
|
||||
{
|
||||
if (arg == "RunFromPT")
|
||||
{
|
||||
runFromPT = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!runFromPT)
|
||||
{
|
||||
AppWindow.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user