private IEnumerable <Window> GetTrayWindows() { var trayWindows = UnmanagedHelpers.FilterWindows((hWnd) => { var window = new Window(hWnd); var isTrayWindow = window.ClassName == "Shell_TrayWnd" || window.ClassName == "Shell_SecondaryTrayWnd"; return(isTrayWindow && Screen.FromHandle(hWnd).Bounds == _screen.Bounds); }); return(trayWindows.Select(hWnd => new Window(hWnd))); }
private static IEnumerable <Window> GetTaskbarWindows() { var trayWindows = UnmanagedHelpers.FilterWindows(IsAltTabWindow); return(trayWindows.Select(hWnd => new Window(hWnd))); }