mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
[Workspaces] Sequential launch (#35297)
This commit is contained in:
@@ -19,7 +19,6 @@ namespace WorkspacesLauncherUI.ViewModels
|
||||
|
||||
private StatusWindow _snapshotWindow;
|
||||
private int launcherProcessID;
|
||||
private bool _exiting;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -30,8 +29,6 @@ namespace WorkspacesLauncherUI.ViewModels
|
||||
|
||||
public MainViewModel()
|
||||
{
|
||||
_exiting = false;
|
||||
|
||||
// receive IPC Message
|
||||
App.IPCMessageReceivedCallback = (string msg) =>
|
||||
{
|
||||
@@ -50,11 +47,6 @@ namespace WorkspacesLauncherUI.ViewModels
|
||||
|
||||
private void HandleAppLaunchingState(AppLaunchData.AppLaunchDataWrapper appLaunchData)
|
||||
{
|
||||
if (_exiting)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
launcherProcessID = appLaunchData.LauncherProcessID;
|
||||
List<AppLaunching> appLaunchingList = new List<AppLaunching>();
|
||||
foreach (var app in appLaunchData.AppLaunchInfos.AppLaunchInfoList)
|
||||
@@ -90,9 +82,7 @@ namespace WorkspacesLauncherUI.ViewModels
|
||||
|
||||
internal void CancelLaunch()
|
||||
{
|
||||
_exiting = true;
|
||||
Process proc = Process.GetProcessById(launcherProcessID);
|
||||
proc.Kill();
|
||||
App.SendIPCMessage("cancel");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user