Add Weston-compatible Wayland capture - #15
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cfd2583. Configure here.
| manager.waylandInput = input | ||
| manager.screenSize = screenSize | ||
| manager.emmiter.Emit("after_screen_size_change") | ||
| manager.waylandMu.Unlock() |
There was a problem hiding this comment.
Screen resize deadlocks Wayland backend
High Severity
SetScreenSize holds waylandMu while emitting before_screen_size_change and after_screen_size_change. Those listeners recreate capture pipelines and call GetScreenSize, which takes an RLock on the same mutex from the same goroutine, so an in-session Wayland resize hangs the server.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit cfd2583. Configure here.
| manager.waylandInput = input | ||
| manager.waylandMu.Unlock() | ||
| manager.logger.Info().Str("screen_size", manager.screenSize.String()).Msg("using Wayland desktop backend") | ||
| return |
There was a problem hiding this comment.
Wayland touch hits nil connection
High Severity
Wayland Start still leaves the default xf86 xinput driver enabled and never calls Connect. HasTouchSupport then reports touch as available, so a client touch event writes to a nil conn and panics instead of using the uinput path or advertising no touch.
Reviewed by Cursor Bugbot for commit cfd2583. Configure here.


summary
validation
go test ./internal/capture ./internal/desktop ./internal/configgo vet ./internal/capture ./internal/desktop ./internal/confignotes
Wayland remains disabled by default. The image integration supplies the compositor-specific recorder separately.
Note
Medium Risk
Adds a new desktop/capture backend that talks to
/dev/uinputand spawns an external recorder, but it is disabled by default and the existing X11 path is largely unchanged.Overview
Adds an opt-in Wayland desktop and capture path so Neko can run against a compositor instead of X11. Capture can pull raw
BGRxframes from a configurable recorder (defaultwf-recorder) into GStreamer viaappsrc; customgst_pipelinestrings are rejected in this mode.Desktop control skips Xorg and injects pointer/keyboard/scroll through a
/dev/uinputvirtual device, with optional output resize viawlr-randr-style commands. Keyboard maps, modifiers, cursor images, and screenshots are no-ops on Wayland; cursor image fetch now tolerates a nil cursor.Config flags:
capture.video.wayland,capture.video.wayland_recorder,desktop.wayland,desktop.wayland.output, anddesktop.wayland.resize_command. Docs and help.json are updated.Reviewed by Cursor Bugbot for commit 9766fb9. Bugbot is set up for automated code reviews on this repo. Configure here.