Introduce FingerId (#3783)

This commit is contained in:
daxpedda 2024-08-08 00:36:36 +02:00 committed by GitHub
parent f07153b8e0
commit 9dff801f93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 329 additions and 113 deletions

View file

@ -359,7 +359,7 @@ impl EventLoop {
device_id,
phase,
location,
id: pointer.pointer_id() as u64,
finger_id: event::FingerId(FingerId(pointer.pointer_id())),
force: Some(Force::Normalized(pointer.pressure() as f64)),
});
@ -705,6 +705,15 @@ impl DeviceId {
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct FingerId(i32);
impl FingerId {
pub const fn dummy() -> Self {
FingerId(0)
}
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PlatformSpecificWindowAttributes;