LavaUI docs GitHub

enum BackdropBridge

Swift

enum BackdropBridge

Compositor frost behind a popup. LavaUI cannot see the desktop, so a client fills this in; a windowed app leaves it nil and .backdropBlur samples this window's own framebuffer instead.

A panel dropdown is the case this exists for. In-window backdropBlur captures this surface, and a panel's surface is empty below the strip — frosting it would smear nothing. The compositor can see the wallpaper and the windows under that rect, and this is how a popup asks it to.

Sources/LavaUI/Overlay.swift:331

Properties

nonisolated(unsafe) static var frostOverlays: (@Sendable (_ radius: Float, _ rects: [FrostRect]) -> Void)?

Frost every rect in the list. An empty list, or radius 0, clears.

A list because a menu with a fly-out submenu beside it is two rectangles with desktop showing between them: one plate cannot be both, and their union would frost the gap.

Sources/LavaUI/Overlay.swift:377

nonisolated(unsafe) static var surfaceBackdrop: (@Sendable (_ plate: WindowPlate?) -> Void)?

The window being drawn's own plate, once a frame: what a view covering the whole window asked for, or nil when none does. A popup's backdrop is entirely this — .backdropBlur(radius:) and .glassEffect on its root.

Not a rectangle in frostOverlays: a region replaces the surface's plate, and the plate is the one thing the compositor cuts to the window's own corner.

Sources/LavaUI/Overlay.swift:400

Types