Add window resizing support and improve process/thread management concurrency

This commit is contained in:
Stone_Red
2026-06-08 13:15:12 +02:00
parent 930a0f6a5d
commit 3be75c60f2
4 changed files with 118 additions and 43 deletions
+3 -5
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Drawing;
using RemSox.Processing;
using RemSox.UI.GUI.Rendering;
@@ -8,7 +9,7 @@ namespace RemSox.UI.GUI.Windows;
public static class WindowManager
{
// Process ID to list of windows
private static readonly Dictionary<int, List<Window>> windows = [];
private static readonly ConcurrentDictionary<int, List<Window>> windows = new();
private static int nextWindowId = 1;
@@ -58,10 +59,7 @@ public static class WindowManager
public static void CloseWindowsForProcess(Process process)
{
if (windows.ContainsKey(process.Id))
{
windows.Remove(process.Id);
}
windows.TryRemove(process.Id, out _);
}
public static void FocusWindow(Window? window)