seat: add PointerHandle::current_location

This commit is contained in:
Ivan Molodetskikh 2020-02-01 18:31:13 +03:00
parent 0ea4ec9abe
commit ba1396ca8c
No known key found for this signature in database
GPG Key ID: 02CE38DA47E9D691
1 changed files with 5 additions and 0 deletions

View File

@ -219,6 +219,11 @@ impl PointerHandle {
grab.axis(&mut handle, details); grab.axis(&mut handle, details);
}); });
} }
/// Access the current location of this pointer in the global space
pub fn current_location(&self) -> (f64, f64) {
self.inner.borrow().location
}
} }
/// A trait to implement a pointer grab /// A trait to implement a pointer grab