OverlayWindowOptions
Electron APIs / overlay / OverlayWindowOptions
Configuration options for an overlay window.
Used at creation time to define the overlay window's behavior and appearance. Extends:
- Standard Electron
BrowserWindowConstructorOptions. - Overlay specific behaviors using
OverlayOptions.
Extends
BrowserWindowConstructorOptions.OverlayOptions
Properties
| Property | Type | Description |
|---|---|---|
disableHardwareAcceleration? | boolean | true—disables hardware (GPU) acceleration for this overlay window only, rendering it via software (CPU) compositing. Unlike app.disableHardwareAcceleration(), this is scoped to the single window and does not affect the rest of the application. Note: shared-texture windows require hardware acceleration to be enabled. Disabling it turns off the GPU-backed shared-texture path, so this option is incompatible with (and ignored for) windows that render via a shared texture. Requires ow-electron >= 39.8.10; ignored on earlier versions. Default false See Software output device Since 1.13.20 |
dpiAware? | boolean | true—the overlay window will be DPI aware (Main monitor DPI). This allows the overlay to scale correctly on high DPI displays. Default false Since 1.7.0 |
enableIsolation? | boolean | Enables Chromium process isolation (sandboxing). Used to enforce stricter security policies or prevent resource sharing between renderer processes. |
ignoreKeyboardInput? | boolean | Controls whether the overlay intercepts keyboard input. true—the overlay won't intercept keyboard input. Default false |
name | string | Unique name (id) for the window. |
passthrough? | PassthroughType | Controls how input is handled by the overlay window. Default 'noPassThrough' See PassthroughType. |
strictToGameWindow? | boolean | When true, the overlay window is strictly confined to the game window boundaries. This prevents the overlay from being moved outside the game window area. Default false Since 1.9.0 |
useSharedTexture? | boolean | ⚠️ BETA — this option is experimental and its behavior may change in a future release. true—renders this overlay window through a GPU shared texture instead of copying pixels through shared memory on every paint. The overlay forwards the GPU texture handle directly to the injected game process, which composites it without any CPU-side pixel copy, significantly lowering per-frame CPU overhead. Requires hardware acceleration to be enabled and the shared-texture path to be usable with the current game (see GameWindowInfo.isSharedTextureAvailable). The flag is silently ignored when either condition is not met, falling back to the shared-memory (CPU copy) path. The rendering path follows the active game: when the overlay moves to a different game, a shared-texture window automatically falls back to the shared-memory (CPU copy) path on a game that does not support shared texture, and restores the shared-texture path on a game that does — so the window stays visible on every game. Default false See Overlay examples Since 2.0.2 |
zOrder? | ZOrderType | Controls the z-order (stacking order) of the overlay window. Default 'default' See ZOrderType. |