[Workspaces] Sequential launch (#35297)

This commit is contained in:
Seraphima Zykova
2024-10-14 16:51:02 +03:00
committed by GitHub
parent 89ec5be5ba
commit 9994fd7715
26 changed files with 419 additions and 158 deletions

View File

@@ -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");
}
}
}