Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/rutabaga_gfx/src/cross_domain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,28 @@ impl CrossDomainContext {

Ok(())
}
// Handle writes to Eventfd items. PipeWire (and other clients
// that pass eventfds via SCM_RIGHTS) uses these for per-period
// wakeups: an 8-byte write to the eventfd's counter signals
// the host. Without this arm, the first such write hits the
// catch-all below, returning InvalidCrossDomainItemType after
// the unconditional remove() above has already dropped the
// item — leaving every subsequent write to the same id
// failing with InvalidCrossDomainItemId. Mirrors the
// WaylandWritePipe re-insert semantics on hang_up == 0.
CrossDomainItem::Eventfd(file) => {
if len != 0 {
write_volatile(&file, opaque_data)?;
}

if cmd_write.hang_up == 0 {
items
.table
.insert(cmd_write.identifier, CrossDomainItem::Eventfd(file));
}

Ok(())
}
_ => Err(RutabagaError::InvalidCrossDomainItemType),
}
}
Expand Down
Loading