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. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
iced_winit
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.