Don't discard high-precision cursor position data (#1375)
* Don't discard high-precision cursor position data Most platforms (X11, wayland, macos, stdweb, ...) provide physical positions in f64 units, which can contain meaningful fractional data. For example, this can be empirically observed on modern X11 using a typical laptop touchpad. This is useful for e.g. content creation tools, where cursor motion might map to brush strokes on a canvas with higher-than-screen resolution, or positioning of an object in a vector space. * Update CHANGELOG.md Co-Authored-By: Murarth <murarth@gmail.com> Co-authored-by: Murarth <murarth@gmail.com>
This commit is contained in:
parent
09c4ed0694
commit
4b618bd6a6
6 changed files with 9 additions and 11 deletions
|
|
@ -242,7 +242,7 @@ pub enum WindowEvent<'a> {
|
|||
/// (x,y) coords in pixels relative to the top-left corner of the window. Because the range of this data is
|
||||
/// limited by the display area and it may have been transformed by the OS to implement effects such as cursor
|
||||
/// acceleration, it should not be used to implement non-cursor-like interactions such as 3D camera control.
|
||||
position: PhysicalPosition<i32>,
|
||||
position: PhysicalPosition<f64>,
|
||||
#[deprecated = "Deprecated in favor of DeviceEvent::ModifiersChanged"]
|
||||
modifiers: ModifiersState,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue