AboutSupportDeveloper GuideVersion 1.3.1

Interface ServerOptions

Options for starting the Snap Server

interface ServerOptions {
    autoHideClientTaskbarIcons?: boolean;
    blurEffectPerformanceThreshold?: number;
    customSnapAssetSource?: string;
    defaultResizingBehavior?: ResizingBehavior;
    disableBlurDropPreview?: boolean;
    disableGPUAcceleratedDragging?: boolean;
    disableRuntimeHeartbeating?: boolean;
    disableUserUnstick?: boolean;
    executablePath?: string;
    hideTaskbarEntry?: boolean;
    keyToStick?: boolean | "ctrl" | "shift";
    keyToUnstick?: "ctrl" | "shift";
    showDebug?: boolean;
    taskbarIcon?: string;
    taskbarIconGroup?: string;
    theme?: "snap-original" | "snap-light1" | "snap-dark1";
}

Properties

autoHideClientTaskbarIcons?: boolean

If true, Snap will try to hide the taskbar icons of windows that are snapped together, and re-show the icons when windows are unsnapped.

blurEffectPerformanceThreshold?: number

This is respected only if the disableBlurDropPreview option is not set. This threshold (in milliseconds) relates to the time taken to render a blur effect. Snap will do a check at start up to measure this performance and automatically disable the blur effect if this threshold time is exceeded. If not provided, the performance check will use a default threshold.

customSnapAssetSource?: string

Used only if the 'openfin-snap' asset is not specified in the app's manifest, in which case this specifies the URL to be used for downloading the Snap asset. If not provided, the default Snap asset URL will be used.

defaultResizingBehavior?: ResizingBehavior

The default resizing behavior to apply to snapped windows. If no value is provided, the default behavior is 'sizeToFit', i.e. to resize windows to fit the snap group. This value can also be overridden per window when registering each window, and in the strategy parameters when launching a new process.

disableBlurDropPreview?: boolean

If true, the drop preview will not be blurred. This can be useful if performance issues are encountered when displaying a drop target and preview. This can occur on lower spec machines.

disableGPUAcceleratedDragging?: boolean

If true, reverts to a slower method of dragging groups of windows

disableRuntimeHeartbeating?: boolean

If true, the Snap server will not send runtime heartbeats to the OpenFin runtime. Ordinarily heartbeating is useful to ensure that the runtime cleans up resources quickly after a client disconnects.

disableUserUnstick?: boolean

If true, prevents the user from unsticking windows (e.g. using SHIFT key)

executablePath?: string

The path to the Snap executable to launch if not using a manifest asset

hideTaskbarEntry?: boolean

If true, snapped window groups will not be shown in the taskbar.

keyToStick?: boolean | "ctrl" | "shift"

If provided, this specifies that a key must be held to stick windows together. The value can be a boolean or a string. If true, the default keyToStick key will be used (CTRL). If no value, or false, is provided, then snapping will be allowed without any key being held.

keyToUnstick?: "ctrl" | "shift"

If provided, this specifies which key must be held to unstick windows. If no value is provided, then the default key will be used (SHIFT).

showDebug?: boolean

True if the Snap debug console should be shown

taskbarIcon?: string

If set, this specifies a URL for a .ico file that will be used in the taskbar for the snapped window groups.

taskbarIconGroup?: string

An ID used by Windows for grouping taskbar entries. If set, all snapped window groups will be shown under the same taskbar entry. If you want to show the snapped window groups under the same taskbar entry as your OpenFin application, you must set this value carefully, as follows: it must start with a prefix of openfin_apps_group. and follow with the value of the following field in the app: https://developer.openfin.co/docs/javascript/stable/interfaces/OpenFin.ApplicationCreationOptions.html#taskbarIconGroup

theme?: "snap-original" | "snap-light1" | "snap-dark1"

The theme to use for Snap visuals.