Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat: added GetMonitorById method to MonitorService

Larsfc59086f30e7
diff --git a/LarsWM.Core/Monitors/MonitorService.cs b/LarsWM.Core/Monitors/MonitorService.cs
index 23ea639b..812632af 100644
--- a/LarsWM.Core/Monitors/MonitorService.cs
+++ b/LarsWM.Core/Monitors/MonitorService.cs
@@ -16,6 +16,11 @@ namespace LarsWM.Core.Monitors
_appState = appState;
}
+ public Monitor GetMonitorById(Guid id)
+ {
+ return _appState.Monitors.FirstOrDefault(m => m.Id == id);
+ }
+
public Monitor GetMonitorFromWindowHandle(Window window)
{
var screen = Screen.FromHandle(window.Hwnd);