public sealed record DesktopWindowActivity : IEquatable<DesktopWindowActivity> Whether a window is active, minimized and visible, as DesktopWindow.Activity last reported it.
Remarks
A window is active while it has the keyboard focus of the desktop: it is the foreground window on Windows, the key window on macOS, and the active window (gtk_window_is_active) on Linux. Another window of the application, a dialog in front of it or another application takes the activity away.
A minimized window is in the taskbar or Dock; a hidden window (DesktopWindow.SetVisibleAsync, DesktopWindowOptions.Hidden) is not visible. A minimized window is neither active nor, on most platforms, visible. Use the values to pause work the user cannot see, such as polling or animations.
On Wayland the compositor does not tell an application that its window was minimized. The GTK 4 window reports a window the compositor stopped showing (GTK 4.12 and later, GDK_TOPLEVEL_STATE_SUSPENDED), such as a minimized one, as not visible, but not as minimized; the GTK 3 window learns nothing, so a minimized window there stays visible and only loses the focus. Treat DesktopWindowActivity.IsMinimized as a hint on Linux.
Constructors
DesktopWindowActivity
public DesktopWindowActivity() No documentation.
Properties
IsActive
public bool IsActive { get; init; } Gets whether the window has the desktop's keyboard focus.
IsMinimized
public bool IsMinimized { get; init; } Gets whether the window is minimized (iconified, miniaturized).
IsVisible
public bool IsVisible { get; init; } Gets whether the window is shown: not hidden and not minimized, though other windows may cover it.