From 7aea9b8147c6c58d26584ce31103e555246fb572 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Sat, 16 Mar 2024 12:34:28 +0100 Subject: [PATCH] use activated stream again --- src/backend/producer/libei.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/producer/libei.rs b/src/backend/producer/libei.rs index 084a531e..d1cd926a 100644 --- a/src/backend/producer/libei.rs +++ b/src/backend/producer/libei.rs @@ -1,5 +1,5 @@ use anyhow::{anyhow, Result}; -use ashpd::desktop::input_capture::{Barrier, Capabilities, InputCapture, Zones, Activated}; +use ashpd::desktop::input_capture::{Barrier, Capabilities, InputCapture, Zones}; use futures::StreamExt; use reis::{ ei::{self, keyboard::KeyState}, @@ -128,14 +128,11 @@ impl LibeiProducer { input_capture.enable(&session).await?; let mut activated = input_capture.receive_activated().await?; - let mut activated = input_capture.receive_all_signals().await?; loop { log::debug!("receiving activation token"); - let activated = activated.next().await.unwrap(); + let activated = activated.next().await.ok_or(anyhow!("error receiving activation token"))?; log::debug!("activation token: {activated:?}"); - let activated: Activated = activated.body().deserialize().unwrap(); - log::debug!("activated: {activated:?}"); let mut entered = false;