mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-06 15:56:29 +02:00
Add window resizing support and improve process/thread management concurrency
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user