Skip to content

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

fix(domain): a window's process name defaults to empty string (#84)

Albert Gouws22b39d15815c
diff --git a/GlazeWM.Domain/Windows/Window.cs b/GlazeWM.Domain/Windows/Window.cs
index a4134936..04faf5f1 100644
--- a/GlazeWM.Domain/Windows/Window.cs
+++ b/GlazeWM.Domain/Windows/Window.cs
@@ -40,7 +40,7 @@ namespace GlazeWM.Domain.Windows
/// </summary>
public bool IsHidden => !WorkspaceService.GetWorkspaceFromChildContainer(this).IsDisplayed;
- public string ProcessName => WindowService.GetProcessOfHandle(Hwnd).ProcessName;
+ public string ProcessName => WindowService.GetProcessOfHandle(Hwnd)?.ProcessName ?? string.Empty;
public string ClassName => WindowService.GetClassNameOfHandle(Hwnd);