mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-28 11:22:47 +01:00
listen_for_commands and read_commands_uds call komorebi_transport::listen_for_commands and read_commands. What only Windows does stays Windows-side behind the ConnectionPolicy hook (WindowsConnectionPolicy): the 1 s read timeout set after accept (on_accept) and the 30 s timeout set when a PanGesture::Begin is read (on_message, called before the 1 s try_lock_for, at the same point of the loop as before). WindowManager implements CommandTarget over uds_windows::UnixListener/UnixStream (the transport crate implements the stream traits for them on Windows). The window manager keeps the 1 s try_lock_for. The TCP listener and read_commands_tcp (blocking wm.lock(), 1024-byte reads, TCP_CONNECTIONS) and the named-pipe subscribers are untouched. Behaviour-preserving, not a literal text move. Cosmetic: the accept-error log line now reads 'failed to get unix stream <error>' like KDE and macOS and logs come from the target komorebi::transport (D29). 80 lines of loop code removed from process_command.rs. Verified: nix develop --command cargo clippy --workspace --locked --all-targets -- -D warnings (x86_64-pc-windows-msvc): finished, no warnings or errors. NOT verified: the Windows unit test and the scenarios; the PanGesture timeout and TCP paths have no test in any tree. Needs the Windows e2e (commands, pausing, pan) before landing.