Skip to main content

Module window_create

Module window_create 

Source
Expand description

window service handler — CreateWindow. Split out of window.rs; see that file’s dispatcher for the full method list.

Modules§

steps 🔒
The steps of CreateWindow, in the order the handler runs them. A step that can refuse the call answers Err with the reply that ends it.

Constants§

JUST_RESTORED_MS 🔒
An opener arriving this soon after a restore, beside another window still opening, opens the default panes at once: the window it would wait for is the one just restored, not one closing.
RESTORED_AT_META_KEY 🔒
When a window last asked for and got a restore (epoch ms, client meta).
RESTORE_WAITS_FOR_CLOSE 🔒
How long a restore asks for waits for a window close still on its way.

Statics§

RESTORE_ELECTION 🔒
Windows asking to restore decide one at a time, so exactly one restores when several open together (a double click on the tray icon) (#5363).

Functions§

create_default_contents 🔒
A new window’s contents: a workspace with one tab seeded with the default panes (agent | sysinfo / swarm), or with the single seed_view pane a widget’s “Open in New Window” asks for. No window shows it yet. Also what a new user workspace’s first window opens (user_workspace_switch). offer_other_build: a cold start with nothing to restore, which may offer a layout another build saved. Returns the workspace and the applied events, unpublished.
create_tab 🔒
Step 2: the workspace’s tab, and the events that made it. When the tab can’t be made, the empty workspace is deleted again.
create_workspace 🔒
Step 1: the new workspace’s id and the events that made it.
created_window_reply 🔒
The reply for a window that was made. Every window has a slot in the panel’s list from the day it is made: the next one, at the end.
first_error 🔒
The message of the first error among events, if any.
handle_create_window 🔒
persist 🔒
Writes events through to the store, stopping at the first failure.
seed_blocks 🔒
Dispatches the seed block(s) through the reducer: the seed_view alone (with seed_meta when given), or the default agent, swarm and sysinfo. For the default 3-pane case, order is the one default_three_pane_tree expects positionally (agent, swarm, sysinfo) — NOT top-to-bottom display order, since sysinfo renders above swarm. Returns the ids made and their events; a block that can’t be made ends the seeding (the tab opens with what there is).
seed_layout 🔒
Writes the layout for the seeded panes: a single leaf for a widget’s “Open in New Window” (see single_leaf_tree), the shared three-pane tree for the default. A cold start with nothing of its own to restore (offer_other_build) also notes what it seeded, for a layout another build saved to be offered. A seeding that came out short leaves the tab blank.