On X11, filter out tiny device mouse events

Usually, if mouse events are equal to (0, 0) we filter them out.
However, if the event is very close to zero it will still be given to
the user. In some cases this can be caused by bad float math on the X11
server side.

Fix it by filtering absolute values smaller than floating point epsilon.

Signed-off-by: John Nunley <dev@notgull.net>
Closes: #3500
This commit is contained in:
John Nunley 2024-03-01 01:11:28 -08:00 committed by GitHub
parent f0b4889227
commit 3d4c53459a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 64 additions and 9 deletions

View file

@ -11,6 +11,7 @@ Unreleased` header.
# Unreleased
- On X11, filter close to zero values in mouse device events
- Move `dpi` types to its own crate, and re-export it from the root crate.
- Implement `Sync` for `EventLoopProxy<T: Send>`.
- **Breaking:** Move `Window::new` to `ActiveEventLoop::create_window` and `EventLoop::create_window` (with the latter being deprecated).