mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-06-27 10:44:48 +03:00
Update reis to 0.7.0
This commit is contained in:
committed by
Ferdinand Schober
parent
d1f41180e3
commit
6fb7e24746
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user