mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 09:06:23 +02:00
Implement z-index for windows and ensure correct stacking order on interaction
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user