Removed code paths inherited from past refactors that no longer have any
reader:
- ViewFn type alias (window.rs)
- a11y_enabled flag and resized flag (lib.rs) — assigned but never read
- BootConfig.fonts/graphics_settings/is_wayland — already passed to
run_instance(...) directly; the BootConfig copies were never read
- Runner.system_theme oneshot::Sender — stored but no producer ever
wired; receiver side already falls back to default
- event_loop/control_flow.rs — local ControlFlow enum, all callers use
winit::event_loop::ControlFlow
- event_loop/proxy.rs — Proxy<Message> never constructed
- Error::Connect(ConnectError) variant — never constructed
- Common.has_focus / ime_pos / ime_size — never read after assignment
- SctkPopupData.grab — replicated settings.grab, never read back
- SubsurfaceEventVariant::Created.surface field — destructure does
`surface: _` everywhere, the value is unused
Visibility tightening:
- a11y.rs WinitActivationHandler / WinitActionHandler /
WinitDeactivationHandler: pub proxy → pub(crate) proxy
- conversion::touch_event: pub → private (no external callers)
- proxy::Proxy:🆕 pub → pub(crate)
Allow attributes (intentional, not warning-suppression):
- conversion::RawImage: #[allow(dead_code)] — fields kept for
IconProvider downcast-via-AsAny on winit's side
- event_loop::Error: #[allow(dead_code)] — variant payloads kept for
Debug, never inspected programmatically
- lib.rs Event<Message>: #[allow(hidden_glob_reexports)] — intentional
shadow of winit::event::Event coming from `pub use winit`
- window.rs/lib.rs: #[allow(deprecated)] on enable_ime/disable_ime/
process_event with TODOs for set_ime_* → request_ime_update and
try_next → try_recv migrations
Five orphan imports also removed (Hash/Hasher, BorrowMut, 3× Compositor).
Leyoda 2026 – GPLv3
- conversion.rs: drop 4 duplicate Interaction arms (Cell/Move/Copy/Help)
that were already handled higher in the same match — pure dead code
from a past merge, not a real bug.
- platform_specific/wayland/mod.rs: migrate HasRawDisplayHandle →
HasDisplayHandle (display_handle().map(|h| h.as_raw())).
- conversion.rs: #[allow(deprecated)] on key_code/winit_key_code — the
warning suggests Meta but no Meta variant exists in this enum
(only MetaLeft/MetaRight, which aren't equivalent to Super).
- window.rs: #[allow(deprecated)] on enable_ime/disable_ime with TODO
to migrate set_ime_* → request_ime_update(ImeRequest::*).
- lib.rs: #[allow(deprecated)] on process_event with TODO to migrate
try_next → try_recv (futures-channel API change).
Leyoda 2026 – GPLv3
- At least, following apps are using `single-instance` feature:
- cosmic-launcher
- cosmic-app-library
- Once libcosmic text widgets supported the IME, these apps start hitting following methods of SctkWinitWindow which is `todo!()` and will crash at startup:
- `set_ime_cursor_area()`
- `set_ime_allowed()`
- `set_ime_purpose()`
- So, this PR implements these method utilizing following wayland protocols.
- zwp_text_input_v3
- zwp_text_input_manager_v3
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.
- Should test `!= 0`, not `> 0`; can scroll in either direction
- Test both vertical and horizontal
- Use `value120` scroll if present (in which case, discrete is 0)
I guess events should really have both line and pixel scroll, since some
widgets want to use the pixel scroll values for input devices that have
both? But I guess winit and Iced both need to be changed for that...