winit-sonoma-fix/src/platform_impl
Simon Hausmann a58400a82c
Fix TouchPhase::Ended reporting on Wayland
When all the receive from the compositor is `TouchEvent::Down` and
`TouchEvent::Up` for the same id, we would record the touch position in
the touch_points vector the first time. On `TouchEvent::Up` we'd find it
and report `TouchPhase::Ended` with that location. The next time we
receive `TouchEvent::Down` for the same id, we'd however unconditionally
append a new `TouchPoint` to `inner.touch_points`, with the new
position. On release however we'd find the earlier point and report its
location, which basically means that `TouchPhase::Ended` always and
forever reported the location of the very first touch down event.

Instead, this patch updates an existing touch point location with the
same id on `TouchDown`.

Fixes #1996
2022-04-11 20:13:28 +03:00
..
android android: Add mapping from NDK Keycode to VirtualKeyCode (#2226) 2022-04-01 18:16:59 +02:00
ios feat: add Window::is_visible (#2169) 2022-02-17 19:44:14 +01:00
linux Fix TouchPhase::Ended reporting on Wayland 2022-04-11 20:13:28 +03:00
macos macOS set_ime_position fixes (#2180) 2022-03-18 14:50:24 +01:00
web Rename internal structs for consistency (#2149) 2022-03-18 14:09:39 +01:00
windows feat(Windows): add skip taskbar methods (#2177) 2022-04-01 20:21:09 +02:00
mod.rs Merge branch 'master' into merge-master-to-web 2019-09-24 14:21:18 -04:00