iced-yoda/winit
Ian Douglas Scott 4fb3ba214b winit: Fix cursor_position for touch events
Some widgets check the cursor position when handling the touch down
event, so we need to make sure `cursor_position` is set then, and not
only when there is a touch move event. Simply always setting it for
`WindowEvent::PointerButton` (for touch or mouse input) seems
reasonable.

We also need to avoid clearing `cursor_position` for `PointerLeft`
with a touch device. Do that only for mouse input.

Ideally Iced would handle touch input without tying to
`cursor_position`, but this should match the behavior of upstream Iced.

This seems to fix regressions since the Iced rebase in the `tour`
example, and in `cosmic-files`. `cosmic-files` seems to have some
issue using the menus with a touch device, but that doesn't seem to be a
regression.
2026-03-09 21:29:00 -04:00
..
src winit: Fix cursor_position for touch events 2026-03-09 21:29:00 -04:00
Cargo.toml fixes: various fixes and cleanup 2026-02-19 17:01:13 -05:00
README.md Update outdated READMEs of subcrates 2024-05-27 13:47:57 +02:00

iced_winit

Documentation Crates.io License Discord Server

iced_winit offers some convenient abstractions on top of iced_native to quickstart development when using winit.

It exposes a renderer-agnostic Application trait that can be implemented and then run with a simple call. The use of this trait is optional. A conversion module is provided for users that decide to implement a custom event loop.

The native target