input: Apply output transform to touch/tablet events
This commit is contained in:
parent
eaeca9a244
commit
e3b41c5c55
1 changed files with 8 additions and 4 deletions
|
|
@ -2146,10 +2146,14 @@ where
|
||||||
B::Device: 'static,
|
B::Device: 'static,
|
||||||
{
|
{
|
||||||
let geometry = output.geometry();
|
let geometry = output.geometry();
|
||||||
event
|
let transform = output.current_transform();
|
||||||
.position_transformed(geometry.size.as_logical())
|
let size = transform
|
||||||
.as_global()
|
.invert()
|
||||||
+ geometry.loc.to_f64()
|
.transform_size(geometry.size.as_logical());
|
||||||
|
geometry.loc.to_f64()
|
||||||
|
+ transform
|
||||||
|
.transform_point_in(event.position_transformed(size), &size.to_f64())
|
||||||
|
.as_global()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Is it possible to determine mapping for external touchscreen?
|
// TODO Is it possible to determine mapping for external touchscreen?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue