added windowContext to ProcessHandle

This commit is contained in:
2023-04-18 19:56:59 +02:00
parent 17be4149db
commit 2da337b8a9
3 changed files with 67 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
package kernel.ui;
import kernel.ps.ProcessManager;
import kernel.ps.ProcessManager.PID;
import haxe.ds.ReadOnlyArray;
import kernel.ui.TermWriteable;
import kernel.peripherals.Peripherals.Peripheral;
@@ -162,4 +164,13 @@ class WindowManager {
context.setTarget(target);
context.enable();
}
public function getContextByPID(pid: PID): ReadOnlyArray<WindowContext> {
var handle = ProcessManager.getProcess(pid);
if (handle == null) {
return [];
}
return handle.getWindowContexts();
}
}