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,
|
||||
{
|
||||
let geometry = output.geometry();
|
||||
event
|
||||
.position_transformed(geometry.size.as_logical())
|
||||
.as_global()
|
||||
+ geometry.loc.to_f64()
|
||||
let transform = output.current_transform();
|
||||
let size = transform
|
||||
.invert()
|
||||
.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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue