LavaUI docs GitHub

enum CursorBridge

Swift

enum CursorBridge

Where the pointer image is actually set.

The same shape as WindowBridge and ScrollBridge: LavaUI must not know what a compositor is. A windowed app sets the cursor on its own GLFW window; a client has no pointer of its own and asks the compositor, which fills request at connect. Unfilled, the windowed path is used, which is the right default for a window and a no-op in a test.

Sources/LavaUI/Cursor.swift:62

Properties

nonisolated(unsafe) static var request: (@Sendable (UInt32, UInt32) -> Void)?

Filled by LavaClient. The shape, then the engine window it was resolved in (WindowID.rawValue), so a second surface sets the pointer for itself and not for the window the app started with. The raw shape keeps the framework's enum out of the IDL layer.

Sources/LavaUI/Cursor.swift:67