[codex] fix linux hook device selection - #356
Conversation
recchia
left a comment
There was a problem hiding this comment.
Compared this against current master. The linux.rs vendor-filter half looks superseded by #401 (merged, more thorough — also handles touchpads/pointing sticks + adds a capture_mouse_events opt-out), and would actually conflict now: linux.rs already imports crate::LOGITECH_VENDOR_ID (u32), so the local const LOGITECH_VENDOR_ID: u16 added here collides with it.
The should_install_os_hook/reconcile_hook idea in orchestrator.rs/main.rs is still genuinely useful though — master still installs the hook on accessibility_granted alone, with no check that an online mouse/trackball actually exists. Worth pulling that part into a fresh PR rebased on current master (hook_runtime::start's signature has grown since — keyboard_bindings/channel_registry/receiver_access/event_monitor), dropping the now-redundant linux.rs hunk.
Fixes #355.
What changed
Why
On Linux the hook backend previously enumerated every evdev device with BTN_LEFT before HID++ inventory had established a target device. On laptops this can include the built-in touchpad or TrackPoint, so OpenLogi could grab those devices and create virtual mice even when there was no Logitech pointing device to manage.
Validation