improve capture error handling

This commit is contained in:
Ferdinand Schober
2024-07-10 09:00:43 +02:00
parent 6a4dd740c3
commit 110b37e26e
14 changed files with 296 additions and 216 deletions

View File

@@ -3,6 +3,8 @@ use std::task::Poll;
use futures_core::Stream;
use crate::CaptureError;
use super::InputCapture;
use input_event::Event;
@@ -32,7 +34,7 @@ impl InputCapture for X11InputCapture {
}
impl Stream for X11InputCapture {
type Item = io::Result<(CaptureHandle, Event)>;
type Item = Result<(CaptureHandle, Event), CaptureError>;
fn poll_next(
self: std::pin::Pin<&mut Self>,