Pure functional state operations for the WindowManagerServer.
Handles window CRUD, property updates, and Z-order management without GenServer concerns.
Summary
Functions
Moves a window to the back of the Z-order. Returns {:reply, result, new_state}.
Moves a window to the front of the Z-order. Returns {:reply, result, new_state}.
Updates all window states when a new active window is set. Returns {:reply, :ok, new_state} or {:reply, {:error, :not_found}, state}.
Builds a child Window struct from a config, parent ID, and window ID.
Builds the legacy-format state map for get_state.
Builds a new Window struct from a config and assigns an ID.
Calculates split size for a child window.
Optionally activates window_id if no active window exists yet.
Determines the new active window after a window is destroyed.
Updates a window property by ID. Takes a function that transforms the window. Returns {:ok, updated_window, new_state} or {:error, :not_found}.
Functions
Moves a window to the back of the Z-order. Returns {:reply, result, new_state}.
Moves a window to the front of the Z-order. Returns {:reply, result, new_state}.
Updates all window states when a new active window is set. Returns {:reply, :ok, new_state} or {:reply, {:error, :not_found}, state}.
Builds a child Window struct from a config, parent ID, and window ID.
Builds the legacy-format state map for get_state.
Builds a new Window struct from a config and assigns an ID.
Calculates split size for a child window.
Optionally activates window_id if no active window exists yet.
Determines the new active window after a window is destroyed.
Updates a window property by ID. Takes a function that transforms the window. Returns {:ok, updated_window, new_state} or {:error, :not_found}.