refactor(transport): add EventChannel

EventChannel<E> is the window-event channel that KDE and macOS each write by hand in window_manager_event_listener.rs: bounded, send is try_send and never blocks, an event that does not fit is dropped with the warning 'channel is full; dropping notification', and an optional predicate (EventChannel::coalescing) lets one coalesced event (the ResizeStep of a drag) wait at a time, released by coalesced_taken(), also when the send of the claiming event fails. The channel also records that an event was dropped (take_overflow); no tree reads it (R6 is a behaviour change, out of scope here). The flag orderings are SeqCst as in the KDE copy (macOS used AcqRel/Release; stronger on one variable, no visible difference). Nothing uses it yet. Logs use the target komorebi::transport (D29).

Verified: cargo test -p komorebi-transport: 13 passed, 0 failed (5 new, the three macOS coalescing tests rewritten against the API, plus no-predicate and drop/overflow); cargo clippy -p komorebi-transport --all-targets -D warnings: clean.
This commit is contained in:
LGUG2Z committed 2026-10-31 01:37:54 -07:00
1 parent 8806a410d8
commit d55b6daeb7
4 files changed
+181

No files matched your search

Generated
+1
View File
@@ -3536,6 +3536,7 @@ name = "komorebi-transport"
version = "0.1.42"
dependencies = [
"color-eyre",
"crossbeam-channel",
"komorebi-protocol",
"parking_lot",
"tracing",