Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sgm1018/BetterWinTab/llms.txt
Use this file to discover all available pages before exploring further.
WindowInfo is the core data model representing a single open window on the Windows desktop. Instances are created and refreshed by the window enumeration service, which calls EnumWindows and augments each result with process metadata, virtual desktop assignments, and user pin state. The collection of WindowInfo objects is the live data source for all folders and the main window grid.
Two
WindowInfo instances are considered equal if and only if their Handle values match. Equality and GetHashCode() are both implemented against Handle.Properties
Core Identity
The Win32 window handle (
HWND) for this window. Used as the primary key for all window lookup, equality checks, and Win32 API calls (focus, thumbnail registration, etc.).The text currently displayed in the window’s title bar, retrieved via
GetWindowText. This value reflects the live title at enumeration time; it is not automatically updated if the window title changes after the snapshot is taken.The executable name of the owning process, without the file extension. Examples:
"Code" for Visual Studio Code, "chrome" for Google Chrome, "notepad" for Notepad. This is the value used by PinnedWindowId for process-level matching.The operating system process identifier (PID) of the owning process, as returned by
GetWindowThreadProcessId. Useful for cross-referencing with System.Diagnostics.Process or Task Manager.The Win32 window class name registered for this window, retrieved via
GetClassName. Examples include "Chrome_WidgetWin_1" for Chromium-based windows or "Notepad" for Notepad. Used by SmartClass folder filtering.Icon
File system path to the icon image associated with this window’s process. Resolved by the icon extraction service from the process executable. Nullable — may be
null if icon extraction fails or the process is inaccessible (e.g., elevated system processes).State
true when the window is currently minimized (iconic). Determined via IsIconic(hwnd). Minimized windows are still enumerated and displayed in BetterWinTab; selecting them will restore and focus them.The timestamp of the last time this window was the foreground window, as tracked by BetterWinTab’s focus-change listener. Defaults to the enumeration time if no prior focus event has been recorded. Used to sort windows by recency within a folder.
Virtual Desktop
The GUID of the virtual desktop this window belongs to, obtained from the
IVirtualDesktopManager COM interface. Each virtual desktop has a stable GUID for the duration of the Windows session.The 1-based ordinal position of the virtual desktop (e.g.,
1 = first desktop, 2 = second). A value of 0 indicates the desktop number could not be determined. This value can shift if the user reorders or closes virtual desktops.The human-readable display name of the virtual desktop. This may be the OS-generated default (e.g.,
"Desktop 1", "Escritorio 2" in a localized OS) or a custom name set by the user in Task View. Used as a label in the window card UI.true when this window resides on the currently active virtual desktop. Updated during each window enumeration pass. BetterWinTab can optionally filter or dim windows not on the current desktop based on this flag.Pin State
true when the user has pinned this window. Pinned windows are displayed first in all folder views, above non-pinned windows, regardless of sort order or filter. This flag is set at enumeration time by matching the window against the PinnedWindows list in AppSettings via PinnedWindowId.Matches().Methods
ToString()
Returns a human-readable representation of the window in the format "ProcessName: Title". For example:
Equality
WindowInfo overrides Equals and GetHashCode to compare solely by Handle:
WindowInfo can be used as a key in Dictionary<WindowInfo, T> or stored in a HashSet<WindowInfo>, with identity determined by HWND.