Update reis to 0.7.0

This commit is contained in:
Ian Douglas Scott
2026-06-19 15:45:01 -07:00
committed by Ferdinand Schober
parent d1f41180e3
commit 6fb7e24746
6 changed files with 28 additions and 51 deletions

View File

@@ -45,7 +45,7 @@ ashpd = { version = "0.13.9", default-features = false, features = [
"screencast",
"tokio",
], optional = true }
reis = { version = "0.5.0", features = ["tokio"], optional = true }
reis = { version = "0.7.0", features = ["tokio"], optional = true }
[target.'cfg(target_os="macos")'.dependencies]
bitflags = "2.6.0"

View File

@@ -291,14 +291,12 @@ async fn ei_event_handler(
) -> Result<(), EmulationError> {
loop {
let event = events.next().await.ok_or(EmulationError::EndOfStream)??;
const CAPABILITIES: &[DeviceCapability] = &[
DeviceCapability::Pointer,
DeviceCapability::PointerAbsolute,
DeviceCapability::Keyboard,
DeviceCapability::Touch,
DeviceCapability::Scroll,
DeviceCapability::Button,
];
let capabilities = DeviceCapability::Pointer
| DeviceCapability::PointerAbsolute
| DeviceCapability::Keyboard
| DeviceCapability::Touch
| DeviceCapability::Scroll
| DeviceCapability::Button;
log::debug!("{event:?}");
match event {
EiEvent::Disconnected(e) => {
@@ -306,7 +304,7 @@ async fn ei_event_handler(
return Err(EmulationError::EndOfStream);
}
EiEvent::SeatAdded(e) => {
e.seat().bind_capabilities(CAPABILITIES);
e.seat().bind_capabilities(capabilities);
}
EiEvent::SeatRemoved(e) => {
log::debug!("seat removed: {:?}", e.seat());
@@ -314,7 +312,6 @@ async fn ei_event_handler(
EiEvent::DeviceAdded(e) => {
let device_type = e.device().device_type();
log::debug!("device added: {device_type:?}");
e.device().device();
let device = e.device();
if let Some(pointer) = e.device().interface::<Pointer>() {
devices