Table of Contents

Class FocusWindowInDirectionTransform

Namespace
Whim
Assembly
Whim.dll
Focus the window adjacent to the given WindowHandle in the workspace with the given WorkspaceId in the provided Direction. Returns whether the active layout engine changed.
public record FocusWindowInDirectionTransform : BaseWorkspaceWindowTransform, IEquatable<Transform<bool>>, IEquatable<BaseWorkspaceTransform>, IEquatable<BaseWorkspaceWindowTransform>, IEquatable<FocusWindowInDirectionTransform>
Inheritance
FocusWindowInDirectionTransform
Implements
Inherited Members

Examples

To focus the window to the left of the specified window:
context.Store.Dispatch(new FocusWindowInDirectionTransform(workspaceId, Direction.Left, windowHandle));
To focus the last focused window in the workspace:
context.Store.Dispatch(new FocusWindowInDirectionTransform(workspaceId, Direction.Left));

Constructors

FocusWindowInDirectionTransform(Guid, Direction, HWND)

Focus the window adjacent to the given WindowHandle in the workspace with the given WorkspaceId in the provided Direction. Returns whether the active layout engine changed.
public FocusWindowInDirectionTransform(Guid WorkspaceId = default, Direction Direction = Direction.None, HWND WindowHandle = default)

Parameters

WorkspaceId Guid
The id of the workspace to focus the window in. Defaults to the active workspace.
Direction Direction
The direction to search for the adjacent window to focus. Defaults to None.
WindowHandle HWND
The handle of the window from which to focus the adjacent window. Default to the last focused window if not provided. If provided, this window must exist in the workspace.

Examples

To focus the window to the left of the specified window:
context.Store.Dispatch(new FocusWindowInDirectionTransform(workspaceId, Direction.Left, windowHandle));
To focus the last focused window in the workspace:
context.Store.Dispatch(new FocusWindowInDirectionTransform(workspaceId, Direction.Left));

Properties

Direction

The direction to search for the adjacent window to focus. Defaults to None.
public Direction Direction { get; init; }

Property Value

Direction