Skip to main content
Wayland client library wrapping common protocols.

Protocols

  • wl_compositor, wl_seat, wl_shm, wl_output
  • zwlr_layer_shell_v1: panels and overlays
  • ext_workspace_manager_v1: workspace tracking
  • zwlr_foreign_toplevel_manager_v1: active window tracking
  • zwp_text_input_v3: IME for CJK input
  • ext_session_lock_v1: lockscreen
  • wl_data_device: clipboard and drag-and-drop
  • wp_viewporter: HiDPI buffer scaling

Key modules

  • Connection: event loop and dispatch
  • Keyboard: xkbcommon wrapper with key repeat
  • TextInput: IME integration (check isComposing() before handling keys)
  • Clipboard: paste and drag-and-drop
  • DamageTracker: dirty rect accumulation with overflow fallback to full redraw
  • capture: ext_image_copy_capture_v1 output and toplevel capture helpers
  • capture_overlay: dimmed frozen-capture backdrop for interactive tools
  • selection_overlay: shared region selector for otter-screenshot, otter-shot, and otter-rec

Region selection overlay

Drag-to-select for screenshots, product shots, and recordings. It composites pixels directly to SHM buffers with incremental damage. Surface Description is not used here. Each app passes a preset (namespace, pool names, visual mode):
PresetUsed byVisual mode
selection_overlay.preset.screenshototter-screenshotFrozen capture at full brightness; border-only selection chrome
selection_overlay.preset.shototter-shotFrozen capture dimmed outside the selection
selection_overlay.preset.recotter-recSame as shot
Live mode skips the freeze and draws a shaded overlay instead. The selector can hide the cursor when the capture omits it.