Skip to content

Commit

Permalink
upgrade ashpd + reis (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber authored Nov 6, 2024
1 parent 9d28fe6 commit 1d25dfb
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 247 deletions.
117 changes: 26 additions & 91 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions input-capture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ wayland-protocols-wlr = { version = "0.3.1", features = [
"client",
], optional = true }
x11 = { version = "2.21.0", features = ["xlib", "xtest"], optional = true }
ashpd = { version = "0.9", default-features = false, features = [
ashpd = { version = "0.10", default-features = false, features = [
"tokio",
], optional = true }
reis = { version = "0.2", features = ["tokio"], optional = true }
reis = { version = "0.4", features = ["tokio"], optional = true }

[target.'cfg(target_os="macos")'.dependencies]
core-graphics = { version = "0.23", features = ["highsierra"] }
Expand Down
23 changes: 2 additions & 21 deletions input-capture/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,10 @@ use wayland_client::{

#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
use ashpd::desktop::ResponseError;
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
use reis::tokio::{EiConvertEventStreamError, HandshakeError};

#[cfg(target_os = "macos")]
use core_graphics::base::CGError;

#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
#[derive(Debug, Error)]
#[error("error in libei stream: {inner:?}")]
pub struct ReisConvertEventStreamError {
inner: EiConvertEventStreamError,
}

#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
impl From<EiConvertEventStreamError> for ReisConvertEventStreamError {
fn from(e: EiConvertEventStreamError) -> Self {
Self { inner: e }
}
}

#[derive(Debug, Error)]
pub enum CaptureError {
#[error("activation stream closed unexpectedly")]
Expand All @@ -48,11 +32,8 @@ pub enum CaptureError {
#[error("io error: `{0}`")]
Io(#[from] std::io::Error),
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
#[error("error in libei stream: `{0}`")]
Reis(#[from] ReisConvertEventStreamError),
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
#[error("libei handshake failed: `{0}`")]
Handshake(#[from] HandshakeError),
#[error("libei error: `{0}`")]
Reis(#[from] reis::Error),
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
#[error(transparent)]
Portal(#[from] ashpd::Error),
Expand Down
Loading

0 comments on commit 1d25dfb

Please sign in to comment.