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
BackdropBridge.FrostRect struct
One rectangle to frost, in this surface's layout pixels. cornerRadius rounds the plate to match the popup sitting on it.
BackdropBridge.WindowPlate struct
The backdrop a view covering the whole window asks for: its .backdropBlur radius (0 if it states none) and its .glassEffect.