Skip to main content

Function: setMainWindow()

function setMainWindow(
mainWindow: MainAppStateWindowLike | null,
options?: StateUpdateOptions
): void;

Defined in: main/state/appState.ts:244

Sets or clears the BrowserWindow tracked by the main process.

Parameters​

mainWindow​

| MainAppStateWindowLike | null

Current main window, or null when no window is active.

options?​

StateUpdateOptions

Additional metadata forwarded to the state manager.

Returns​

void