GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat(domain): add utility `IsHandleVisible` method for getting whether a window handle is actually visible
Lars Bergerb2beed7ba0ce
diff --git a/GlazeWM.Domain/Windows/WindowService.cs b/GlazeWM.Domain/Windows/WindowService.csindex 9c8afa79..eee2d73c 100644--- a/GlazeWM.Domain/Windows/WindowService.cs+++ b/GlazeWM.Domain/Windows/WindowService.cs@@ -141,12 +141,18 @@ namespace GlazeWM.Domain.Windowsreturn isCloaked;}- public bool IsHandleManageable(IntPtr handle)+ /// <summary>+ /// Whether the given handle is actually visible.+ /// </summary>+ public bool IsHandleVisible(IntPtr handle){- // Get whether window is actually visible.- var isVisible = IsWindowVisible(handle) && !IsHandleCloaked(handle);+ return IsWindowVisible(handle) && !IsHandleCloaked(handle);+ }- if (!isVisible)+ public bool IsHandleManageable(IntPtr handle)+ {+ // Ignore windows that are hidden.+ if (!IsHandleVisible(handle))return false;// Ensure window is top-level (ie. not a child window). Ignore windows that are probably