aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-12-09 09:30:56 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-12-09 09:30:56 +0400
commit675932c05b6c9a99c7d7403f66b2d31b0fd99933 (patch)
treeaa453662b96d3cba31c0827115bbdbaadfd868d0 /src/input.rs
parent475d6e4be177b74c23ba225d7cdf6ec30826a374 (diff)
downloadniri-675932c05b6c9a99c7d7403f66b2d31b0fd99933.tar.gz
niri-675932c05b6c9a99c7d7403f66b2d31b0fd99933.tar.bz2
niri-675932c05b6c9a99c7d7403f66b2d31b0fd99933.zip
Document compute_tablet_position()
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/input.rs b/src/input.rs
index 292d08bc..08cb5f46 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -140,8 +140,12 @@ impl State {
}
}
+ /// Computes the cursor position for the tablet event.
+ ///
+ /// This function handles the tablet output mapping, as well as coordinate clamping and aspect
+ /// ratio correction.
fn compute_tablet_position<I: InputBackend>(
- &mut self,
+ &self,
event: &(impl Event<I> + TabletToolEvent<I>),
) -> Option<Point<f64, Logical>>
where