Skip to content
Open
Show file tree
Hide file tree
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
54 changes: 54 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ default = [
"libei_emulation",
"rdp_emulation",
"x11_emulation",
"evdev_emulation",
]
gtk = ["dep:lan-mouse-gtk"]
layer_shell_capture = ["input-capture/layer_shell"]
Expand All @@ -89,6 +90,7 @@ libei_emulation = ["input-event/libei", "input-emulation/libei"]
wlroots_emulation = ["input-emulation/wlroots"]
x11_emulation = ["input-emulation/x11"]
rdp_emulation = ["input-emulation/remote_desktop_portal"]
evdev_emulation = ["input-emulation/evdev"]

[package.metadata.bundle]
name = "Lan Mouse"
Expand Down
2 changes: 1 addition & 1 deletion input-capture/src/layer_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ impl Dispatch<WlPointer, ()> for State {
})),
));
}
wl_pointer::Event::Frame {} => {
wl_pointer::Event::Frame => {
// TODO properly handle frame events
// we simply insert a frame event on the client side
// after each event for now
Expand Down
7 changes: 6 additions & 1 deletion input-emulation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ ashpd = { version = "0.10", default-features = false, features = [
"tokio",
], optional = true }
reis = { version = "0.4", features = ["tokio"], optional = true }
evdev = { version = "0.13.1", features = [
"stream-trait",
"tokio",
], optional = true }

[target.'cfg(target_os="macos")'.dependencies]
bitflags = "2.6.0"
Expand All @@ -61,13 +65,14 @@ windows = { version = "0.58.0", features = [
] }

[features]
default = ["wlroots", "x11", "remote_desktop_portal", "libei"]
default = ["wlroots", "x11", "remote_desktop_portal", "libei", "evdev"]
wlroots = [
"dep:wayland-client",
"dep:wayland-protocols",
"dep:wayland-protocols-wlr",
"dep:wayland-protocols-misc",
]
evdev = ["dep:evdev"]
x11 = ["dep:x11"]
remote_desktop_portal = ["dep:ashpd"]
libei = ["dep:reis", "dep:ashpd"]
10 changes: 10 additions & 0 deletions input-emulation/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub enum EmulationCreationError {
#[cfg(all(unix, feature = "libei", not(target_os = "macos")))]
#[error("libei backend: `{0}`")]
Libei(#[from] LibeiEmulationCreationError),
#[cfg(all(target_os = "linux", feature = "evdev"))]
#[error("evdev backend: `{0}`")]
Evdev(#[from] EvdevEmulationCreationError),
#[cfg(all(unix, feature = "remote_desktop_portal", not(target_os = "macos")))]
#[error("xdg-desktop-portal: `{0}`")]
Xdp(#[from] XdpEmulationCreationError),
Expand Down Expand Up @@ -135,6 +138,13 @@ pub enum LibeiEmulationCreationError {
Reis(#[from] reis::Error),
}

#[cfg(all(target_os = "linux", feature = "evdev"))]
#[derive(Debug, Error)]
pub enum EvdevEmulationCreationError {
#[error(transparent)]
Io(#[from] std::io::Error),
}

#[cfg(all(unix, feature = "remote_desktop_portal", not(target_os = "macos")))]
#[derive(Debug, Error)]
pub enum XdpEmulationCreationError {
Expand Down
Loading
Loading