mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
On Windows, fix reported cursor position. (#2311)
When clicking and moving the cursor out of the window negative coordinates were not handled correctly.
This commit is contained in:
committed by
GitHub
parent
5d85c10a2c
commit
58cd23d1ac
@@ -106,13 +106,13 @@ const fn get_xbutton_wparam(x: u32) -> u16 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
const fn get_x_lparam(x: u32) -> u16 {
|
const fn get_x_lparam(x: u32) -> i16 {
|
||||||
loword(x)
|
loword(x) as _
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
const fn get_y_lparam(x: u32) -> u16 {
|
const fn get_y_lparam(x: u32) -> i16 {
|
||||||
hiword(x)
|
hiword(x) as _
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|||||||
Reference in New Issue
Block a user