bugfix(x11): Properly interpret float data in drag ops
Closes #3245 notgull forgot to properly interpret float data from the X server, making him tonight's biggest loser. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
parent
0be2bb0a8c
commit
e9784127df
3 changed files with 14 additions and 3 deletions
|
|
@ -1128,3 +1128,9 @@ impl Device {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert the raw X11 representation for a 32-bit floating point to a double.
|
||||
#[inline]
|
||||
fn xinput_fp1616_to_float(fp: xinput::Fp1616) -> f64 {
|
||||
(fp as f64) / ((1 << 16) as f64)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue