mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[PT Run] Closing PT Run and new settings app when PowerToys is not running (#3853)
Closing PowerLauncher, FZ Editor and new settings app when PowerToys is not running
This commit is contained in:
committed by
GitHub
parent
38350a1ae4
commit
6fdfd3b9e7
@@ -25,6 +25,7 @@ namespace FancyZonesEditor
|
||||
ActiveZoneSetTmpFile,
|
||||
AppliedZoneSetTmpFile,
|
||||
CustomZoneSetsTmpFile,
|
||||
PowerToysPID,
|
||||
}
|
||||
|
||||
private static CanvasLayoutModel _blankCustomModel;
|
||||
@@ -242,6 +243,13 @@ namespace FancyZonesEditor
|
||||
|
||||
private static string _customZoneSetsTmpFile;
|
||||
|
||||
public static int PowerToysPID
|
||||
{
|
||||
get { return _powerToysPID; }
|
||||
}
|
||||
|
||||
private static int _powerToysPID;
|
||||
|
||||
// UpdateLayoutModels
|
||||
// Update the five default layouts based on the new ZoneCount
|
||||
private void UpdateLayoutModels()
|
||||
@@ -410,7 +418,7 @@ namespace FancyZonesEditor
|
||||
WorkArea = SystemParameters.WorkArea;
|
||||
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (args.Length == 5)
|
||||
if (args.Length == 6)
|
||||
{
|
||||
var parsedLocation = args[(int)CmdArgs.X_Y_Width_Height].Split('_');
|
||||
var x = int.Parse(parsedLocation[0]);
|
||||
@@ -424,6 +432,8 @@ namespace FancyZonesEditor
|
||||
_appliedZoneSetTmpFile = args[(int)CmdArgs.AppliedZoneSetTmpFile];
|
||||
_customZoneSetsTmpFile = args[(int)CmdArgs.CustomZoneSetsTmpFile];
|
||||
|
||||
int.TryParse(args[(int)CmdArgs.PowerToysPID], out _powerToysPID);
|
||||
|
||||
ParseDeviceInfoData();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user