Skip to main content
otter-wayland wraps Wayland protocols and shared surface policy. Import native leaf modules such as otter_wayland.connection, otter_wayland.hub, and otter_wayland.xdg_toplevel.

Event model

Each proxy has one owner. State records store copyable wl.Id identities rather than raw proxy pointers. Listeners append records to hub.Hub; components pump those records and expose event queues or generation counters. There is no callback-plus-userdata or SubscriberList API. Dispatch the connection, pump relevant components, then drain events in your app loop.

Lightweight clients

Protocol-only applications can use otter_wayland_core from otr/core/. It excludes render and xkbcommon-dependent modules. Use either otter_wayland or core, never both: their types and hub contexts are distinct package identities.

Lua

otter_wayland_lua provides otter.wayland. Read outputs, toplevels, and workspaces without an action capability. Activation, closing, and workspace changes require wayland-actions; clipboard reads and writes require clipboard. The binding opens its own connection lazily and registers its descriptor with the plugin host. subscribe callbacks run through the host loop, not from libwayland callbacks.

Reference pages

Source reference

otr/otr.toml, otr/ in the component repository.