Implement z-index for windows and ensure correct stacking order on interaction

This commit is contained in:
Stone_Red
2026-06-08 13:31:27 +02:00
parent 3be75c60f2
commit 4561e1f997
4 changed files with 50 additions and 29 deletions
+1 -21
View File
@@ -91,7 +91,7 @@ public class Kernel : Sys.Kernel
if (leftButtonDown && !wasLeftButtonDown)
{
activeInteractWindow = TryBeginInteract(pointerPosition);
activeInteractWindow = WindowManager.TryBeginInteract(pointerPosition);
}
else if (leftButtonDown && activeInteractWindow is not null)
{
@@ -111,26 +111,6 @@ public class Kernel : Sys.Kernel
lastPointerPosition = pointerPosition;
}
private static Window? TryBeginInteract(Point pointerPosition)
{
foreach (Processing.Process process in ProcessManager.GetAllProcesses())
{
List<Window> windows = WindowManager.GetWindowsForProcess(process);
for (int index = windows.Count - 1; index >= 0; index--)
{
Window window = windows[index];
if (window.TryBeginInteract(pointerPosition))
{
return window;
}
}
}
return null;
}
}
public class TestProcess() : Processing.Process("Test Process")