Module window

Module window 

Source
Expand description

Window CRUD, focus, workspace switching, and repair operations.

Functions§

check_and_fix_window 🔒
Check and fix a window — ensure it has a valid workspace with tabs.
close_window
Close a window and remove from client’s window list. Cascades cleanup through workspace → tabs → blocks, killing all shell processes.
create_window
Create a new window pointing to a workspace. If workspace_id is empty, auto-creates a new workspace + default tab (matches Go behavior).
create_window_full
Create a new window with all required objects in a single transaction. If workspace_id is empty, creates workspace + tab + window + updates client all in one BEGIN/COMMIT — reducing 8+ lock acquisitions and fsyncs to 1.
focus_window
Focus a window (move to front of client’s window list).
switch_workspace
Switch a window to a different workspace.