mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-06-29 13:44:56 +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 = [
|
||||
"input_capture",
|
||||
"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]
|
||||
core-graphics = { version = "0.25.0", features = ["highsierra"] }
|
||||
|
||||
@@ -529,15 +529,6 @@ fn distance_to_line(line: ((f32, f32), (f32, f32)), p: (f32, f32)) -> f32 {
|
||||
distance
|
||||
}
|
||||
|
||||
static ALL_CAPABILITIES: &[DeviceCapability] = &[
|
||||
DeviceCapability::Pointer,
|
||||
DeviceCapability::PointerAbsolute,
|
||||
DeviceCapability::Keyboard,
|
||||
DeviceCapability::Touch,
|
||||
DeviceCapability::Scroll,
|
||||
DeviceCapability::Button,
|
||||
];
|
||||
|
||||
async fn handle_ei_event(
|
||||
ei_event: EiEvent,
|
||||
current_client: Option<Position>,
|
||||
@@ -545,9 +536,15 @@ async fn handle_ei_event(
|
||||
event_tx: &Sender<(Position, CaptureEvent)>,
|
||||
release_session: &Notify,
|
||||
) -> Result<(), CaptureError> {
|
||||
let all_capabilities = DeviceCapability::Pointer
|
||||
| DeviceCapability::PointerAbsolute
|
||||
| DeviceCapability::Keyboard
|
||||
| DeviceCapability::Touch
|
||||
| DeviceCapability::Scroll
|
||||
| DeviceCapability::Button;
|
||||
match ei_event {
|
||||
EiEvent::SeatAdded(s) => {
|
||||
s.seat.bind_capabilities(ALL_CAPABILITIES);
|
||||
s.seat.bind_capabilities(all_capabilities);
|
||||
context.flush().map_err(|e| io::Error::new(e.kind(), e))?;
|
||||
}
|
||||
EiEvent::SeatRemoved(_) | /* EiEvent::DeviceAdded(_) | */ EiEvent::DeviceRemoved(_) => {
|
||||
|
||||
Reference in New Issue
Block a user