From e4d6dc1f68b931db6b0cf05ea865081801979685 Mon Sep 17 00:00:00 2001 From: leyoda Date: Fri, 24 Apr 2026 06:00:03 +0200 Subject: [PATCH 01/15] yoda: drop x11 default on winit workspace dep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was pulling winit's full x11 backend (winit-x11 + x11-dl) unconditionally despite iced_winit's own x11 feature being disabled. Fixed by adding default-features=false on the workspace-level winit dep — iced_winit/wayland + wayland-dlopen propagate to winit/wayland + wayland-dlopen as needed. --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 49b4b5d7..83e62d54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -305,7 +305,11 @@ winapi = "0.3" window_clipboard = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } dnd = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } mime = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } -winit = { git = "https://github.com/pop-os/winit.git", tag = "cosmic-0.14" } +# Yoda: default-features = false drops winit's x11 default, which otherwise +# pulls winit-x11, x11-dl, tiny-xlib, as-raw-xcb-connection. Our Wayland-only +# fork doesn't need any of that — the wayland + wayland-dlopen features are +# re-enabled via iced_winit's own feature propagation from libcosmic-yoda. +winit = { git = "https://github.com/pop-os/winit.git", tag = "cosmic-0.14", default-features = false } winit-core = { git = "https://github.com/pop-os/winit.git", tag = "cosmic-0.14" } cursor-icon = "1.1.0" From 8f6be7984af03bc5457966b416d7a240b2c31d4e Mon Sep 17 00:00:00 2001 From: leyoda Date: Fri, 24 Apr 2026 06:24:15 +0200 Subject: [PATCH 02/15] yoda: gate iced_wgpu x11 backend behind an opt-in feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iced_wgpu's unix block unconditionally depended on as-raw-xcb-connection, tiny-xlib and x11rb for a DRI3 device-id fallback in window/compositor.rs that only fires when wayland can't determine the GPU. On a Wayland-only build this code path never runs, so the deps are pure bloat. Changes: - Cargo.toml: move the 3 x11 crates to optional + new feature `x11` (not in default — wayland-only is the yoda target; users who need X11 opt in). - window.rs: cfg-gate `mod x11;` on feature = "x11" - window/compositor.rs: cfg-gate `use super::x11::get_x11_device_ids` + the or_else fallback on feature = "x11" (wrapped in a let-binding so the non-x11 branch compiles cleanly). Result: iced_wgpu no longer pulls any x11 crate when built without the feature. --- wgpu/Cargo.toml | 11 ++++++++--- wgpu/src/window.rs | 2 +- wgpu/src/window/compositor.rs | 8 +++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 48fca1b8..ffbcd293 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -25,6 +25,11 @@ svg = ["iced_graphics/svg", "resvg/text"] web-colors = ["iced_graphics/web-colors"] webgl = ["wgpu/webgl"] strict-assertions = [] +# Yoda: opt-in X11 backend. Pulls tiny-xlib/as-raw-xcb-connection/x11rb +# (which otherwise were unconditional direct deps on unix). Wayland-only +# builds just leave this off — window/x11.rs and the DRI3 device-id +# fallback in window/compositor.rs are cfg-gated on it. +x11 = ["dep:as-raw-xcb-connection", "dep:tiny-xlib", "dep:x11rb"] [dependencies] iced_debug.workspace = true @@ -57,9 +62,9 @@ wayland-protocols.workspace = true wayland-backend = { version = "0.3.3", features = ["client_system"] } wayland-client = { version = "0.31.2" } wayland-sys = { version = "0.31.1", features = ["dlopen"] } -as-raw-xcb-connection = "1.0.1" -tiny-xlib = "0.2.3" -x11rb = { version = "0.13.1", features = [ +as-raw-xcb-connection = { version = "1.0.1", optional = true } +tiny-xlib = { version = "0.2.3", optional = true } +x11rb = { version = "0.13.1", optional = true, features = [ "allow-unsafe-code", "dl-libxcb", "dri3", diff --git a/wgpu/src/window.rs b/wgpu/src/window.rs index b9ec54bd..f71b7d3f 100644 --- a/wgpu/src/window.rs +++ b/wgpu/src/window.rs @@ -7,7 +7,7 @@ pub mod compositor; not(target_os = "redox") ))] mod wayland; -#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))] +#[cfg(all(unix, feature = "x11", not(target_os = "macos"), not(target_os = "redox")))] mod x11; pub use compositor::Compositor; diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index 833a642e..15a13905 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -16,7 +16,7 @@ use crate::{Engine, Renderer}; not(target_os = "redox") ))] use super::wayland::get_wayland_device_ids; -#[cfg(all(unix, not(target_os = "macos"), not(target_os = "redox")))] +#[cfg(all(unix, feature = "x11", not(target_os = "macos"), not(target_os = "redox")))] use super::x11::get_x11_device_ids; use std::future::Future; @@ -72,8 +72,10 @@ impl Compositor { not(target_os = "redox") ))] let ids = compatible_window.as_ref().and_then(|window| { - get_wayland_device_ids(window) - .or_else(|| get_x11_device_ids(window)) + let w = get_wayland_device_ids(window); + #[cfg(feature = "x11")] + let w = w.or_else(|| get_x11_device_ids(window)); + w }); // HACK: From f0c0b8d42ecdc52ff6d8b155225051bf6e009f5b Mon Sep 17 00:00:00 2001 From: leyoda Date: Fri, 24 Apr 2026 06:53:36 +0200 Subject: [PATCH 03/15] yoda: softbuffer + window_clipboard default-features=false Two one-line workspace-dep fixes that drop the last remaining X11 crates for Wayland-only builds: - softbuffer: its default = [kms, x11, x11-dlopen, wayland, wayland-dlopen] pulled tiny-xlib + as-raw-xcb-connection unconditionally even though iced_tiny_skia only needed softbuffer/wayland. Disabling the default lets iced_tiny_skia's own feature propagation ask for just wayland + wayland-dlopen. - window_clipboard: upstream pulled clipboard_x11 + clipboard_wayland unconditionally on unix. Our local fork (branch yoda-x11-optional) gates clipboard_x11 behind an opt-in feature, so default-features=false + features=["wayland"] drops ~500 x11 symbols (clipboard_x11, x11rb, x11rb-protocol). Combined with previous yoda-v4 cuts, cosmic-yoterm goes from 1526 -> 43 x11 symbols (-97%), and 55.4 MB -> 53.3 MB (-2.1 MB). --- Cargo.toml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 83e62d54..18a433f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -276,7 +276,10 @@ tiny-skia = { version = "0.11", default-features = false, features = [ "simd", ] } cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "160b086" } -softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "cosmic-4.0" } +# Yoda: default-features=false drops softbuffer's x11 / x11-dlopen (pulled +# tiny-xlib + as-raw-xcb-connection). The wayland + wayland-dlopen features +# are re-activated via iced_tiny_skia's own `wayland` feature propagation. +softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "cosmic-4.0", default-features = false } syntect = "5.2" tokio = "1.0" tracing = "0.1" @@ -302,7 +305,11 @@ wayland-client = { version = "0.31.5" } winapi = "0.3" # window_clipboard = "0.4.1" -window_clipboard = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } +# Yoda: window_clipboard via git path = our local fork that has x11 gated +# behind an opt-in feature. default-features=false + features=["wayland"] +# drops clipboard_x11 + x11rb from the build. +# Kept at /home/lionel/Devels/window_clipboard branch yoda-x11-optional. +window_clipboard = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20", default-features = false, features = ["wayland"] } dnd = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } mime = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } # Yoda: default-features = false drops winit's x11 default, which otherwise From bb9115558d2649c3bced42d340648b8dbceb1fa2 Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 08:27:03 +0200 Subject: [PATCH 04/15] Fix high-signal widget and Wayland warnings Avoid recursive operation traversal, execute visible list updates instead of leaving a lazy iterator unused, remove unreachable cfg-gated surface creation code, and handle subsurface buffer attachment failures. --- widget/src/container.rs | 2 +- widget/src/list.rs | 2 +- winit/src/platform_specific/mod.rs | 7 +++++-- winit/src/platform_specific/wayland/subsurface_widget.rs | 5 ++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/widget/src/container.rs b/widget/src/container.rs index c9a300c9..e4aeabf2 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -601,7 +601,7 @@ pub fn visible_bounds(id: Id) -> Task> { operate: &mut dyn FnMut(&mut dyn Operation>), ) { self.depth += 1; - self.traverse(operate); + operate(self); self.depth -= 1; } diff --git a/widget/src/list.rs b/widget/src/list.rs index de9fe9b8..6b5f663f 100644 --- a/widget/src/list.rs +++ b/widget/src/list.rs @@ -366,7 +366,7 @@ where self.visible_elements .iter_mut() .zip(&mut state.visible_layouts) - .map(|(element, (index, layout, tree))| { + .for_each(|(element, (index, layout, tree))| { element.as_widget_mut().update( tree, event, diff --git a/winit/src/platform_specific/mod.rs b/winit/src/platform_specific/mod.rs index 9b74ee9c..5e84d16a 100644 --- a/winit/src/platform_specific/mod.rs +++ b/winit/src/platform_specific/mod.rs @@ -153,9 +153,12 @@ impl PlatformSpecific { ) -> Option> { #[cfg(all(feature = "cctk", target_os = "linux"))] { - return self.wayland.create_surface(); + self.wayland.create_surface() + } + #[cfg(not(all(feature = "cctk", target_os = "linux")))] + { + None } - None } pub(crate) fn update_surface_shm( diff --git a/winit/src/platform_specific/wayland/subsurface_widget.rs b/winit/src/platform_specific/wayland/subsurface_widget.rs index ed53d9ea..15233009 100644 --- a/winit/src/platform_specific/wayland/subsurface_widget.rs +++ b/winit/src/platform_specific/wayland/subsurface_widget.rs @@ -410,7 +410,10 @@ impl SubsurfaceState { .unwrap(); canvas[0..width as usize * height as usize * 4].copy_from_slice(data); surface.damage_buffer(0, 0, width as i32, height as i32); - buffer.attach_to(&surface); + if let Err(err) = buffer.attach_to(&surface) { + log::warn!("failed to attach shm buffer to subsurface: {err}"); + return; + } surface.offset(offset.x as i32, offset.y as i32); wp_viewport.set_destination( (width as f64 / scale) as i32, From f388dfdfe47c2aa0c71bc89dae735993973c2ffb Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 12:52:06 +0200 Subject: [PATCH 05/15] yoda: point window_clipboard at public Forgejo fork MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace pop-os/window_clipboard sctk-0.20 (no wayland feature) with forge.aditua.com/leyoda/window_clipboard branch yoda-x11-optional. This removes the need for cosmic-files' [patch] redirect to a local path and makes libcosmic build standalone again. Leyoda 2026 – GPLv3 --- Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 18a433f2..99841e8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -305,13 +305,13 @@ wayland-client = { version = "0.31.5" } winapi = "0.3" # window_clipboard = "0.4.1" -# Yoda: window_clipboard via git path = our local fork that has x11 gated -# behind an opt-in feature. default-features=false + features=["wayland"] -# drops clipboard_x11 + x11rb from the build. -# Kept at /home/lionel/Devels/window_clipboard branch yoda-x11-optional. -window_clipboard = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20", default-features = false, features = ["wayland"] } -dnd = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } -mime = { git = "https://github.com/pop-os/window_clipboard.git", tag = "sctk-0.20" } +# Yoda: window_clipboard pinned to our public fork that has x11 gated behind +# an opt-in feature. default-features=false + features=["wayland"] drops +# clipboard_x11 + x11rb from the build. Branch yoda-x11-optional on +# https://forge.aditua.com/leyoda/window_clipboard. +window_clipboard = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional", default-features = false, features = ["wayland"] } +dnd = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } +mime = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } # Yoda: default-features = false drops winit's x11 default, which otherwise # pulls winit-x11, x11-dl, tiny-xlib, as-raw-xcb-connection. Our Wayland-only # fork doesn't need any of that — the wayland + wayland-dlopen features are From 8a7a32ff927c210c7fee07c214834deccc9f8136 Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 16:45:37 +0200 Subject: [PATCH 06/15] =?UTF-8?q?yoda:=20cargo=20fix=20--lib=20across=20al?= =?UTF-8?q?l=20crates=20=E2=80=94=20drop=20~115=20trivial=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-applied suggestions (unused imports, _-prefixed unused params, redundant mutability) on iced_core, iced_widget, iced_runtime, iced_winit, iced_wgpu, iced_graphics, iced_tiny_skia. From 170 warnings down to 55. Leyoda 2026 – GPLv3 --- core/src/element.rs | 2 +- core/src/overlay/group.rs | 2 +- core/src/widget/operation/search_id.rs | 2 +- core/src/widget/text.rs | 3 +- graphics/src/image.rs | 2 - runtime/src/dnd.rs | 4 +- runtime/src/lib.rs | 1 - .../src/platform_specific/wayland/popup.rs | 4 +- .../platform_specific/wayland/subsurface.rs | 9 +--- tiny_skia/src/raster.rs | 2 +- wgpu/src/layer.rs | 1 - wgpu/src/lib.rs | 4 +- wgpu/src/window/compositor.rs | 1 - widget/src/button.rs | 2 +- widget/src/checkbox.rs | 2 +- widget/src/container.rs | 2 +- widget/src/image.rs | 4 +- widget/src/keyed/column.rs | 1 - widget/src/lazy.rs | 2 +- widget/src/lazy/component.rs | 4 +- widget/src/list.rs | 2 +- widget/src/mouse_area.rs | 1 - widget/src/pane_grid/content.rs | 2 +- widget/src/scrollable.rs | 7 ++- widget/src/slider.rs | 2 +- widget/src/stack.rs | 1 - widget/src/svg.rs | 1 - widget/src/themer.rs | 1 - widget/src/toggler.rs | 7 ++- winit/src/a11y.rs | 1 - winit/src/application/drag_resize.rs | 2 +- winit/src/clipboard.rs | 2 +- winit/src/conversion.rs | 12 ++--- winit/src/lib.rs | 12 ++--- winit/src/platform_specific/mod.rs | 9 +--- .../wayland/event_loop/mod.rs | 4 -- .../wayland/event_loop/state.rs | 6 +-- .../wayland/handlers/activation.rs | 1 - .../wayland/handlers/seat/seat.rs | 2 +- .../wayland/handlers/shell/corner_radius.rs | 10 ++-- winit/src/platform_specific/wayland/mod.rs | 12 ++--- .../platform_specific/wayland/sctk_event.rs | 18 +++---- .../wayland/subsurface_widget.rs | 4 +- .../platform_specific/wayland/winit_window.rs | 50 +++++++++---------- winit/src/proxy.rs | 1 - 45 files changed, 85 insertions(+), 139 deletions(-) diff --git a/core/src/element.rs b/core/src/element.rs index f97ed6bc..dbe449c5 100644 --- a/core/src/element.rs +++ b/core/src/element.rs @@ -1,4 +1,4 @@ -use crate::event::{self, Event}; +use crate::event::Event; use crate::id::Id; use crate::layout; use crate::mouse; diff --git a/core/src/overlay/group.rs b/core/src/overlay/group.rs index ec0906e7..1a4ce672 100644 --- a/core/src/overlay/group.rs +++ b/core/src/overlay/group.rs @@ -3,7 +3,7 @@ use crate::mouse; use crate::overlay; use crate::renderer; use crate::widget; -use crate::{Clipboard, Event, Layout, Overlay, Point, Rectangle, Shell, Size}; +use crate::{Clipboard, Event, Layout, Overlay, Shell, Size}; /// An [`Overlay`] container that displays multiple overlay [`overlay::Element`] /// children. diff --git a/core/src/widget/operation/search_id.rs b/core/src/widget/operation/search_id.rs index 1286abaf..e03fac8a 100644 --- a/core/src/widget/operation/search_id.rs +++ b/core/src/widget/operation/search_id.rs @@ -4,7 +4,7 @@ use super::Operation; use crate::{ Rectangle, id::Id, - widget::operation::{Outcome, focusable::Count}, + widget::operation::Outcome, }; /// Produces an [`Operation`] that searches for the Id diff --git a/core/src/widget/text.rs b/core/src/widget/text.rs index 1e40bf9e..19e76761 100644 --- a/core/src/widget/text.rs +++ b/core/src/widget/text.rs @@ -25,13 +25,12 @@ use crate::layout; use crate::mouse; use crate::renderer; use crate::text::paragraph::{self, Paragraph}; -use crate::text::{self, Fragment}; +use crate::text::{self}; use crate::widget::tree::{self, Tree}; use crate::{ Color, Element, Layout, Length, Pixels, Rectangle, Size, Theme, Widget, }; -use std::borrow::Cow; pub use text::{Alignment, Ellipsize, LineHeight, Shaping, Wrapping}; /// A bunch of text. diff --git a/graphics/src/image.rs b/graphics/src/image.rs index e5fe9281..d9b23216 100644 --- a/graphics/src/image.rs +++ b/graphics/src/image.rs @@ -2,8 +2,6 @@ #[cfg(feature = "image")] use crate::core::Bytes; -use crate::core::Color; -use crate::core::Radians; use crate::core::Rectangle; use crate::core::image; use crate::core::svg; diff --git a/runtime/src/dnd.rs b/runtime/src/dnd.rs index e6f2b267..446bee68 100644 --- a/runtime/src/dnd.rs +++ b/runtime/src/dnd.rs @@ -1,10 +1,8 @@ //! Access the clipboard. -use std::any::Any; use dnd::{DndDestinationRectangle, DndSurface}; -use iced_core::clipboard::DndSource; -use window_clipboard::mime::{AllowedMimeTypes, AsMimeTypes}; +use window_clipboard::mime::AllowedMimeTypes; use crate::{oneshot, task, Action, Task}; diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 22da3d66..68034bfc 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -28,7 +28,6 @@ pub use task::Task; pub use user_interface::UserInterface; pub use window::Window; -use crate::core::Color; use crate::futures::futures::channel::oneshot; use std::borrow::Cow; diff --git a/runtime/src/platform_specific/wayland/popup.rs b/runtime/src/platform_specific/wayland/popup.rs index e0475eb8..d186f5f0 100644 --- a/runtime/src/platform_specific/wayland/popup.rs +++ b/runtime/src/platform_specific/wayland/popup.rs @@ -1,14 +1,12 @@ -use std::any::Any; use std::fmt; use std::hash::{Hash, Hasher}; -use std::sync::Arc; use cctk::sctk::reexports::protocols::xdg::shell::client::xdg_positioner::{ Anchor, Gravity, }; use iced_core::layout::Limits; use iced_core::window::Id; -use iced_core::{Element, Rectangle}; +use iced_core::Rectangle; /// Popup creation details #[derive(Debug, Clone)] diff --git a/runtime/src/platform_specific/wayland/subsurface.rs b/runtime/src/platform_specific/wayland/subsurface.rs index f174b0a5..13ae6da2 100644 --- a/runtime/src/platform_specific/wayland/subsurface.rs +++ b/runtime/src/platform_specific/wayland/subsurface.rs @@ -1,14 +1,9 @@ -use std::any::Any; use std::fmt; use std::hash::{Hash, Hasher}; -use std::sync::Arc; -use cctk::sctk::reexports::protocols::xdg::shell::client::xdg_positioner::{ - Anchor, Gravity, -}; -use iced_core::layout::Limits; +use cctk::sctk::reexports::protocols::xdg::shell::client::xdg_positioner::Gravity; use iced_core::window::Id; -use iced_core::{Element, Point, Rectangle, Size}; +use iced_core::{Point, Rectangle, Size}; /// Subsurface creation details #[derive(Debug, Clone)] diff --git a/tiny_skia/src/raster.rs b/tiny_skia/src/raster.rs index 7c820917..cf508c9c 100644 --- a/tiny_skia/src/raster.rs +++ b/tiny_skia/src/raster.rs @@ -57,7 +57,7 @@ impl Pipeline { let width_scale = bounds.width / image.width() as f32; let height_scale = bounds.height / image.height() as f32; - let quality = match filter_method { + let _quality = match filter_method { raster::FilterMethod::Linear => tiny_skia::FilterQuality::Bilinear, raster::FilterMethod::Nearest => tiny_skia::FilterQuality::Nearest, }; diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs index d4a96ef8..c61730b6 100644 --- a/wgpu/src/layer.rs +++ b/wgpu/src/layer.rs @@ -1,4 +1,3 @@ -use crate::core::Radians; use crate::core::{ self, Background, Color, Point, Rectangle, Svg, Transformation, renderer, }; diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 4eb52cc8..830f9911 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -64,8 +64,8 @@ pub use geometry::Geometry; use crate::core::renderer; use crate::core::{ - Background, Color, Font, Pixels, Point, Radians, Rectangle, Size, - Transformation, Vector, image::FilterMethod, + Background, Color, Font, Pixels, Point, Rectangle, Size, + Transformation, Vector, }; use crate::graphics::mesh; use crate::graphics::text::{Editor, Paragraph}; diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index 15a13905..56c01980 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -18,7 +18,6 @@ use crate::{Engine, Renderer}; use super::wayland::get_wayland_device_ids; #[cfg(all(unix, feature = "x11", not(target_os = "macos"), not(target_os = "redox")))] use super::x11::get_x11_device_ids; -use std::future::Future; /// A window graphics backend for iced powered by `wgpu`. pub struct Compositor { diff --git a/widget/src/button.rs b/widget/src/button.rs index f137221e..ed7f6ea9 100644 --- a/widget/src/button.rs +++ b/widget/src/button.rs @@ -599,7 +599,7 @@ where (x + width) as f64, (y + height) as f64, ); - let is_hovered = state.state.downcast_ref::().is_hovered; + let _is_hovered = state.state.downcast_ref::().is_hovered; let mut node = Node::new(Role::Button); node.add_action(Action::Focus); diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs index 873a4541..83960569 100644 --- a/widget/src/checkbox.rs +++ b/widget/src/checkbox.rs @@ -536,7 +536,7 @@ where }; let bounds = layout.bounds(); - let is_hovered = cursor.is_over(bounds); + let _is_hovered = cursor.is_over(bounds); let Rectangle { x, y, diff --git a/widget/src/container.rs b/widget/src/container.rs index e4aeabf2..a264007a 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -35,7 +35,7 @@ use crate::core::{ color, }; -use iced_runtime::{Action, Task, task}; +use iced_runtime::{Task, task}; /// A widget that aligns its contents inside of its boundaries. /// diff --git a/widget/src/image.rs b/widget/src/image.rs index 4315709a..d726eeec 100644 --- a/widget/src/image.rs +++ b/widget/src/image.rs @@ -293,8 +293,8 @@ fn drawing_bounds( content_fit: ContentFit, rotation: Rotation, scale: f32, - opacity: f32, - border_radius: [f32; 4], + _opacity: f32, + _border_radius: [f32; 4], ) -> Rectangle where Renderer: image::Renderer, diff --git a/widget/src/keyed/column.rs b/widget/src/keyed/column.rs index baaee5c9..f3e33142 100644 --- a/widget/src/keyed/column.rs +++ b/widget/src/keyed/column.rs @@ -1,7 +1,6 @@ //! Keyed columns distribute content vertically while keeping continuity. //! Distribute content vertically. -use crate::core::event; use crate::core::layout; use crate::core::mouse; use crate::core::overlay; diff --git a/widget/src/lazy.rs b/widget/src/lazy.rs index 7a1f8506..7a2611ee 100644 --- a/widget/src/lazy.rs +++ b/widget/src/lazy.rs @@ -15,7 +15,7 @@ use crate::core::mouse; use crate::core::overlay; use crate::core::renderer; use crate::core::widget::tree::{self, Tree}; -use crate::core::widget::{self, Widget}; +use crate::core::widget::Widget; use crate::core::{ self, Clipboard, Event, Length, Rectangle, Shell, Size, Vector, }; diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs index a810e117..682fd458 100644 --- a/widget/src/lazy/component.rs +++ b/widget/src/lazy/component.rs @@ -527,11 +527,11 @@ where renderer: &Renderer, dnd_rectangles: &mut core::clipboard::DndDestinationRectangles, ) { - let mut tree = tree + let tree = tree .state .downcast_ref::>>>() .borrow_mut(); - let mut tree = tree.as_ref().unwrap(); + let tree = tree.as_ref().unwrap(); self.with_element(|element| { element.as_widget().drag_destinations( &tree.children[0], diff --git a/widget/src/list.rs b/widget/src/list.rs index 6b5f663f..d0d501d2 100644 --- a/widget/src/list.rs +++ b/widget/src/list.rs @@ -1,5 +1,5 @@ #![allow(missing_docs)] -use crate::core::event::{self, Event}; +use crate::core::event::Event; use crate::core::layout; use crate::core::mouse; use crate::core::overlay; diff --git a/widget/src/mouse_area.rs b/widget/src/mouse_area.rs index 3d355c52..4d808348 100644 --- a/widget/src/mouse_area.rs +++ b/widget/src/mouse_area.rs @@ -2,7 +2,6 @@ use iced_renderer::core::mouse::Click; -use crate::core::event; use crate::core::layout; use crate::core::mouse; use crate::core::overlay; diff --git a/widget/src/pane_grid/content.rs b/widget/src/pane_grid/content.rs index a76010e7..4c41e3a6 100644 --- a/widget/src/pane_grid/content.rs +++ b/widget/src/pane_grid/content.rs @@ -6,7 +6,7 @@ use crate::core::renderer; use crate::core::widget::{self, Tree}; use crate::core::{ self, Clipboard, Element, Event, Layout, Point, Rectangle, Shell, Size, - Vector, event, + Vector, }; use crate::pane_grid::{Draggable, TitleBar}; diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index e005a7b8..b14e1413 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -27,7 +27,6 @@ use iced_runtime::core::widget::Id; #[cfg(feature = "a11y")] use std::borrow::Cow; -use crate::core::event; use crate::core::keyboard; use crate::core::layout; use crate::core::mouse; @@ -933,7 +932,7 @@ where let had_input_method = shell.input_method().is_enabled(); - let mut c_event = match event.clone() { + let c_event = match event.clone() { Event::Dnd(dnd::DndEvent::Offer( id, dnd::OfferEvent::Enter { @@ -1586,7 +1585,7 @@ where return A11yTree::default(); } let window = layout.bounds(); - let is_hovered = cursor.is_over(window); + let _is_hovered = cursor.is_over(window); let Rectangle { x, y, @@ -1670,7 +1669,7 @@ where })) { let scrollbar_bounds = scrollbar.total_bounds; - let is_hovered = cursor.is_over(scrollbar_bounds); + let _is_hovered = cursor.is_over(scrollbar_bounds); let Rectangle { x, y, diff --git a/widget/src/slider.rs b/widget/src/slider.rs index ff32f417..e3fe484a 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -695,7 +695,7 @@ where }; let bounds = layout.bounds(); - let is_hovered = cursor.is_over(bounds); + let _is_hovered = cursor.is_over(bounds); let Rectangle { x, y, diff --git a/widget/src/stack.rs b/widget/src/stack.rs index e85bf2af..cd30a886 100644 --- a/widget/src/stack.rs +++ b/widget/src/stack.rs @@ -1,6 +1,5 @@ //! Display content on top of other content. -use crate::core::event; use crate::core::layout; use crate::core::mouse; use crate::core::overlay; diff --git a/widget/src/svg.rs b/widget/src/svg.rs index 277af3eb..61b1e688 100644 --- a/widget/src/svg.rs +++ b/widget/src/svg.rs @@ -31,7 +31,6 @@ use crate::core::{ #[cfg(feature = "a11y")] use std::borrow::Cow; -use std::marker::PhantomData; use std::path::PathBuf; pub use crate::core::svg::Handle; diff --git a/widget/src/themer.rs b/widget/src/themer.rs index 306c8580..76448ae1 100644 --- a/widget/src/themer.rs +++ b/widget/src/themer.rs @@ -1,6 +1,5 @@ use crate::container; -use crate::core::event; use crate::core::layout; use crate::core::mouse; use crate::core::overlay; diff --git a/widget/src/toggler.rs b/widget/src/toggler.rs index d398a79b..43ba6930 100644 --- a/widget/src/toggler.rs +++ b/widget/src/toggler.rs @@ -37,7 +37,6 @@ use std::borrow::Cow; use iced_runtime::core::border::Radius; use crate::core::alignment; -use crate::core::border; use crate::core::layout; use crate::core::mouse; use crate::core::renderer; @@ -509,7 +508,7 @@ where let space = style.handle_margin; - let toggler_background_bounds = Rectangle { + let _toggler_background_bounds = Rectangle { x: bounds.x, y: bounds.y, width: bounds.width, @@ -529,7 +528,7 @@ where style.background, ); - let padding = (style.padding_ratio * bounds.height).round(); + let _padding = (style.padding_ratio * bounds.height).round(); let toggler_foreground_bounds = Rectangle { x: bounds.x + if self.is_toggled { @@ -570,7 +569,7 @@ where }; let bounds = layout.bounds(); - let is_hovered = cursor.is_over(bounds); + let _is_hovered = cursor.is_over(bounds); let Rectangle { x, y, diff --git a/winit/src/a11y.rs b/winit/src/a11y.rs index a901b480..61fbe630 100644 --- a/winit/src/a11y.rs +++ b/winit/src/a11y.rs @@ -4,7 +4,6 @@ use crate::futures::futures::channel::mpsc; use iced_accessibility::accesskit::{ ActivationHandler, Node, NodeId, Role, Tree, TreeId, TreeUpdate, }; -use iced_accessibility::accesskit_winit::Adapter; use iced_runtime::core; pub struct WinitActivationHandler { diff --git a/winit/src/application/drag_resize.rs b/winit/src/application/drag_resize.rs index 6d575b52..5e524736 100644 --- a/winit/src/application/drag_resize.rs +++ b/winit/src/application/drag_resize.rs @@ -25,7 +25,7 @@ const DRAG_RESIZE_SUPPORTED: bool = false; /// If supported by winit, returns a closure that implements cursor resize support. pub fn event_func( - window: &dyn winit::window::Window, + _window: &dyn winit::window::Window, border_size: f64, ) -> Option< Box< diff --git a/winit/src/clipboard.rs b/winit/src/clipboard.rs index d302ac36..da83d37a 100644 --- a/winit/src/clipboard.rs +++ b/winit/src/clipboard.rs @@ -1,7 +1,7 @@ //! Access the clipboard. use std::sync::Mutex; -use std::{any::Any, borrow::Cow}; +use std::borrow::Cow; use crate::Control; diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index fcb73c39..0afb8e72 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -3,7 +3,6 @@ //! [`winit`]: https://github.com/rust-windowing/winit //! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.14/runtime use crate::core::input_method; -use std::hash::DefaultHasher; use std::hash::Hash; use std::hash::Hasher; use std::sync::Arc; @@ -14,7 +13,6 @@ use crate::core::theme; use crate::core::touch; use crate::core::window; use crate::core::{Event, Point, Size}; -use iced_futures::core::event::PlatformSpecific; use winit::dpi::PhysicalPosition; use winit::event::ButtonSource; use winit::event::ElementState; @@ -27,7 +25,7 @@ use winit::keyboard::SmolStr; pub fn window_attributes( settings: window::Settings, title: &str, - scale_factor: f64, + _scale_factor: f64, primary_monitor: Option, _id: Option, ) -> winit::window::WindowAttributes { @@ -396,8 +394,8 @@ pub fn window_event( Ime::Commit(content) => input_method::Event::Commit(content), Ime::Disabled => input_method::Event::Closed, Ime::DeleteSurrounding { - before_bytes, - after_bytes, + before_bytes: _, + after_bytes: _, } => todo!(), })), WindowEvent::Focused(focused) => Some(Event::Window(if focused { @@ -411,7 +409,7 @@ pub fn window_event( WindowEvent::DragDropped { paths, .. } => { Some(Event::Window(window::Event::FileDropped(paths.clone()))) } - WindowEvent::DragLeft { position } => { + WindowEvent::DragLeft { position: _ } => { Some(Event::Window(window::Event::FilesHoveredLeft)) } @@ -707,7 +705,7 @@ enum TouchInternal { pub fn touch_event( finger: FingerId, state: TouchInternal, - force: Option, + _force: Option, position: Option>, scale_factor: f64, ) -> touch::Event { diff --git a/winit/src/lib.rs b/winit/src/lib.rs index 735d73aa..5b5d1ce1 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -53,7 +53,6 @@ mod window; pub use clipboard::Clipboard; pub use error::Error; pub use proxy::Proxy; -use winit::dpi::LogicalSize; use winit::dpi::PhysicalPosition; use winit::dpi::PhysicalSize; @@ -322,9 +321,9 @@ where // create initial window let Some(BootConfig { sender, - fonts, - graphics_settings, - is_wayland, + fonts: _, + graphics_settings: _, + is_wayland: _, }) = self.boot.take() else { return; @@ -636,10 +635,7 @@ where #[cfg(feature = "a11y")] fn init_adapter(&mut self, event_loop: &(dyn winit::event_loop::ActiveEventLoop + 'static), id: core::window::Id, window: Arc) { use crate::a11y::*; - use iced_accessibility::accesskit::{ - ActivationHandler, Node, NodeId, Role, - Tree, TreeUpdate, - }; + use iced_accessibility::accesskit_winit::Adapter; let node_id = diff --git a/winit/src/platform_specific/mod.rs b/winit/src/platform_specific/mod.rs index 5e84d16a..66eda20c 100644 --- a/winit/src/platform_specific/mod.rs +++ b/winit/src/platform_specific/mod.rs @@ -1,14 +1,11 @@ //! Wayland specific shell //! -use std::{borrow::Cow, collections::HashMap, sync::Arc}; +use std::collections::HashMap; -#[cfg(all(feature = "cctk", target_os = "linux"))] -use cctk::sctk::reexports::client::Connection; use iced_graphics::{Compositor, compositor}; use iced_runtime::{ - core::{Vector, window}, - platform_specific, user_interface, + core::{Vector, window}, user_interface, }; use winit::raw_window_handle::HasWindowHandle; @@ -17,8 +14,6 @@ pub mod wayland; #[cfg(all(feature = "cctk", target_os = "linux"))] pub use wayland::*; -#[cfg(all(feature = "cctk", target_os = "linux"))] -use wayland_backend::client::Backend; use crate::{CreateCompositor, Program, WindowManager}; diff --git a/winit/src/platform_specific/wayland/event_loop/mod.rs b/winit/src/platform_specific/wayland/event_loop/mod.rs index 6c63f218..87d00ec2 100644 --- a/winit/src/platform_specific/wayland/event_loop/mod.rs +++ b/winit/src/platform_specific/wayland/event_loop/mod.rs @@ -2,8 +2,6 @@ pub mod control_flow; pub mod proxy; pub mod state; -#[cfg(feature = "a11y")] -use crate::platform_specific::SurfaceIdWrapper; use crate::{ Control, futures::futures::channel::mpsc, @@ -43,8 +41,6 @@ use cctk::{ }; use raw_window_handle::HasDisplayHandle; use state::{FrameStatus, SctkWindow, send_event}; -#[cfg(feature = "a11y")] -use std::sync::{Arc, Mutex}; use std::{ collections::{HashMap, HashSet}, fmt::Debug, diff --git a/winit/src/platform_specific/wayland/event_loop/state.rs b/winit/src/platform_specific/wayland/event_loop/state.rs index 9c9a4e11..3d93a015 100644 --- a/winit/src/platform_specific/wayland/event_loop/state.rs +++ b/winit/src/platform_specific/wayland/event_loop/state.rs @@ -29,7 +29,6 @@ use std::{ convert::Infallible, fmt::Debug, sync::{Arc, Mutex, atomic::AtomicU32}, - thread::panicking, time::Duration, }; use wayland_backend::client::ObjectId; @@ -50,7 +49,6 @@ use cctk::{ activation::{ActivationState, RequestData}, compositor::CompositorState, error::GlobalError, - globals::GlobalData, output::OutputState, reexports::{ calloop::{LoopHandle, timer::TimeoutAction}, @@ -1258,7 +1256,7 @@ impl SctkState { let timer = cctk::sctk::reexports::calloop::timer::Timer::from_duration(Duration::from_millis(30)); let queue_handle = self.queue_handle.clone(); _ = self.loop_handle.insert_source(timer, move |_, _, state| { - let Some((mut popup, attempt)) = state.pending_popup.take() else { + let Some((popup, attempt)) = state.pending_popup.take() else { return TimeoutAction::Drop; }; @@ -1574,7 +1572,7 @@ impl SctkState { if let Some(manager) = self.corner_radius_manager.as_ref() { if let Some(w) = self.windows.iter_mut().find(|w| w.id == id) { let geo_size: LogicalSize = w.window.surface_size().cast::().to_logical(w.window.scale_factor()); - let half_min_dim = ((geo_size.width as u32).min(geo_size.height as u32) / 2); + let half_min_dim = (geo_size.width as u32).min(geo_size.height as u32) / 2 ; if let Some(radii) = v { let adjusted_radii = CornerRadius { diff --git a/winit/src/platform_specific/wayland/handlers/activation.rs b/winit/src/platform_specific/wayland/handlers/activation.rs index 6b03a8dd..ed5f2259 100644 --- a/winit/src/platform_specific/wayland/handlers/activation.rs +++ b/winit/src/platform_specific/wayland/handlers/activation.rs @@ -3,7 +3,6 @@ use cctk::sctk::{ delegate_activation, reexports::client::protocol::{wl_seat::WlSeat, wl_surface::WlSurface}, }; -use iced_futures::futures::channel::oneshot::Sender; use crate::platform_specific::wayland::event_loop::state::SctkState; diff --git a/winit/src/platform_specific/wayland/handlers/seat/seat.rs b/winit/src/platform_specific/wayland/handlers/seat/seat.rs index 2901ce8e..b0fe43f4 100644 --- a/winit/src/platform_specific/wayland/handlers/seat/seat.rs +++ b/winit/src/platform_specific/wayland/handlers/seat/seat.rs @@ -18,7 +18,7 @@ impl SeatHandler for SctkState { fn new_seat( &mut self, _conn: &cctk::sctk::reexports::client::Connection, - qh: &cctk::sctk::reexports::client::QueueHandle, + _qh: &cctk::sctk::reexports::client::QueueHandle, seat: cctk::sctk::reexports::client::protocol::wl_seat::WlSeat, ) { self.sctk_events.push(SctkEvent::SeatEvent { diff --git a/winit/src/platform_specific/wayland/handlers/shell/corner_radius.rs b/winit/src/platform_specific/wayland/handlers/shell/corner_radius.rs index bd7d2409..67439671 100644 --- a/winit/src/platform_specific/wayland/handlers/shell/corner_radius.rs +++ b/winit/src/platform_specific/wayland/handlers/shell/corner_radius.rs @@ -1,17 +1,13 @@ -use cctk::{sctk, cosmic_protocols::{ - corner_radius::v1::client::{ +use cctk::{sctk, cosmic_protocols::corner_radius::v1::client::{ cosmic_corner_radius_manager_v1::CosmicCornerRadiusManagerV1, cosmic_corner_radius_toplevel_v1::CosmicCornerRadiusToplevelV1, - }, - overlap_notify::v1::client::zcosmic_overlap_notification_v1::ZcosmicOverlapNotificationV1, -}}; + }}; use sctk::reexports::{ client::{Connection, Dispatch, Proxy}, }; use crate::event_loop::state::SctkState; -use crate::platform_specific::wayland::SctkEvent; impl Dispatch for SctkState { fn event( @@ -31,7 +27,7 @@ impl > for SctkState { fn event( - state: &mut Self, + _state: &mut Self, _proxy: &CosmicCornerRadiusToplevelV1, event: ::Event, _data: &(), diff --git a/winit/src/platform_specific/wayland/mod.rs b/winit/src/platform_specific/wayland/mod.rs index 9b3a7ec0..321561da 100644 --- a/winit/src/platform_specific/wayland/mod.rs +++ b/winit/src/platform_specific/wayland/mod.rs @@ -18,7 +18,7 @@ use cursor_icon::CursorIcon; use iced_futures::futures::channel::mpsc; use iced_graphics::{Compositor, compositor}; use iced_runtime::core::{Vector, window}; -use raw_window_handle::{DisplayHandle, HasDisplayHandle, HasWindowHandle}; +use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; use raw_window_handle::{HasRawDisplayHandle, RawWindowHandle}; use sctk_event::SctkEvent; use std::{collections::HashMap, sync::Arc}; @@ -189,12 +189,12 @@ impl WaylandSpecific { winit_event_sender, proxy, sender, - display_handle, - conn, + display_handle: _, + conn: _, surface_ids, modifiers, subsurface_state, - surface_subsurfaces, + surface_subsurfaces: _, } = self; match e { @@ -237,7 +237,7 @@ impl WaylandSpecific { &mut self, keep: F, ) { - self.surface_subsurfaces.retain(|k, v| keep(*k)) + self.surface_subsurfaces.retain(|k, _v| keep(*k)) } pub(crate) fn clear_subsurface_list(&mut self) { @@ -250,7 +250,7 @@ impl WaylandSpecific { wl_surface: &WlSurface, ) { let subsurfaces = crate::subsurface_widget::take_subsurfaces(); - let mut entry = self.surface_subsurfaces.entry(id); + let entry = self.surface_subsurfaces.entry(id); let surface_subsurfaces = entry.or_default(); let Some(subsurface_state) = self.subsurface_state.as_mut() else { return; diff --git a/winit/src/platform_specific/wayland/sctk_event.rs b/winit/src/platform_specific/wayland/sctk_event.rs index 3a1a0166..8c2b24df 100755 --- a/winit/src/platform_specific/wayland/sctk_event.rs +++ b/winit/src/platform_specific/wayland/sctk_event.rs @@ -4,7 +4,7 @@ use crate::{ SurfaceIdWrapper, UserInterfaces, wayland::{ conversion::{ - modifiers_to_native, pointer_axis_to_native, + modifiers_to_native, pointer_button_to_native, }, keymap::{self, keysym_to_key}, @@ -25,7 +25,6 @@ use iced_futures::{ }, }, }, - event, futures::{SinkExt, channel::mpsc}, }; use iced_graphics::{Compositor, compositor}; @@ -40,9 +39,7 @@ use iced_runtime::{ user_interface, }; -use cctk::{ - cosmic_protocols::overlap_notify::v1::client::zcosmic_overlap_notification_v1, - sctk::{ +use cctk::sctk::{ output::OutputInfo, reexports::{ calloop::channel, @@ -67,11 +64,8 @@ use cctk::{ wlr_layer::{Layer, LayerSurfaceConfigure}, xdg::{popup::PopupConfigure, window::WindowConfigure}, }, - }, - wayland_client::protocol::wl_subsurface::WlSubsurface, -}; + }; use std::{ - any::Any, collections::HashMap, num::NonZeroU32, sync::{Arc, Mutex}, @@ -510,7 +504,7 @@ impl SctkEvent { ), ), ), - SurfaceIdWrapper::Window(id) => { + SurfaceIdWrapper::Window(_id) => { Some(iced_runtime::core::Event::Window( window::Event::Unfocused, )) @@ -538,7 +532,7 @@ impl SctkEvent { ), ), ), - SurfaceIdWrapper::Subsurface(id) => None, + SurfaceIdWrapper::Subsurface(_id) => None, }) { events.push(( @@ -572,7 +566,7 @@ impl SctkEvent { ), ), ), - SurfaceIdWrapper::Window(id) => { + SurfaceIdWrapper::Window(_id) => { Some(iced_runtime::core::Event::Window( window::Event::Focused, )) diff --git a/winit/src/platform_specific/wayland/subsurface_widget.rs b/winit/src/platform_specific/wayland/subsurface_widget.rs index 15233009..7f15854b 100644 --- a/winit/src/platform_specific/wayland/subsurface_widget.rs +++ b/winit/src/platform_specific/wayland/subsurface_widget.rs @@ -58,9 +58,7 @@ use wayland_protocols::wp::{ }; use winit::window::WindowId; -use crate::platform_specific::{ - SurfaceIdWrapper, event_loop::state::SctkState, -}; +use crate::platform_specific::event_loop::state::SctkState; #[derive(Debug)] pub struct Plane { diff --git a/winit/src/platform_specific/wayland/winit_window.rs b/winit/src/platform_specific/wayland/winit_window.rs index 296d8b67..fd562a45 100644 --- a/winit/src/platform_specific/wayland/winit_window.rs +++ b/winit/src/platform_specific/wayland/winit_window.rs @@ -1,9 +1,9 @@ use crate::platform_specific::wayland::Action; use cctk::sctk::reexports::{ - calloop::{LoopHandle, channel}, + calloop::channel, client::{ Proxy, QueueHandle, - protocol::{wl_display::WlDisplay, wl_surface::WlSurface}, + protocol::wl_display::WlDisplay, }, }; use raw_window_handle::HandleError; @@ -91,7 +91,7 @@ impl winit::window::Window for SctkWinitWindow { } } - fn set_cursor_visible(&self, visible: bool) { + fn set_cursor_visible(&self, _visible: bool) { // TODO } @@ -203,35 +203,35 @@ impl winit::window::Window for SctkWinitWindow { // TODO refer to winit for implementation } - fn set_outer_position(&self, position: winit::dpi::Position) {} + fn set_outer_position(&self, _position: winit::dpi::Position) {} fn outer_size(&self) -> winit::dpi::PhysicalSize { // XXX not applicable to wrapped surfaces Default::default() } - fn set_min_surface_size(&self, min_size: Option) { + fn set_min_surface_size(&self, _min_size: Option) { // XXX not applicable to wrapped surfaces } - fn set_max_surface_size(&self, max_size: Option) { + fn set_max_surface_size(&self, _max_size: Option) { // XXX not applicable to wrapped surfaces } fn set_surface_resize_increments( &self, - increments: Option, + _increments: Option, ) { log::warn!( "`set_surface_resize_increments` is not implemented for Wayland" ) } - fn set_title(&self, title: &str) { + fn set_title(&self, _title: &str) { // XXX not applicable to wrapped surfaces } - fn set_transparent(&self, transparent: bool) { + fn set_transparent(&self, _transparent: bool) { todo!() } @@ -286,23 +286,23 @@ impl winit::window::Window for SctkWinitWindow { _ = self.tx.send(Action::SetImePurpose(purpose)); } - fn set_blur(&self, blur: bool) { + fn set_blur(&self, _blur: bool) { // TODO } - fn set_visible(&self, visible: bool) {} + fn set_visible(&self, _visible: bool) {} fn is_visible(&self) -> Option { None } - fn set_resizable(&self, resizable: bool) {} + fn set_resizable(&self, _resizable: bool) {} fn is_resizable(&self) -> bool { false } - fn set_enabled_buttons(&self, buttons: winit::window::WindowButtons) { + fn set_enabled_buttons(&self, _buttons: winit::window::WindowButtons) { // TODO v5 of xdg_shell. } @@ -310,7 +310,7 @@ impl winit::window::Window for SctkWinitWindow { WindowButtons::all() } - fn set_minimized(&self, minimized: bool) { + fn set_minimized(&self, _minimized: bool) { // XXX not applicable to the wrapped surfaces } @@ -319,7 +319,7 @@ impl winit::window::Window for SctkWinitWindow { None } - fn set_maximized(&self, maximized: bool) { + fn set_maximized(&self, _maximized: bool) { // XXX can't minimize the wrapped surfaces } @@ -330,7 +330,7 @@ impl winit::window::Window for SctkWinitWindow { fn set_fullscreen( &self, - fullscreen: Option, + _fullscreen: Option, ) { // XXX can't fullscreen the wrapped surfaces } @@ -340,7 +340,7 @@ impl winit::window::Window for SctkWinitWindow { None } - fn set_decorations(&self, decorations: bool) { + fn set_decorations(&self, _decorations: bool) { // XXX no decorations supported for the wrapped surfaces } @@ -348,26 +348,26 @@ impl winit::window::Window for SctkWinitWindow { false } - fn set_window_level(&self, level: winit::window::WindowLevel) {} + fn set_window_level(&self, _level: winit::window::WindowLevel) {} - fn set_window_icon(&self, window_icon: Option) {} + fn set_window_icon(&self, _window_icon: Option) {} fn focus_window(&self) {} fn request_user_attention( &self, - request_type: Option, + _request_type: Option, ) { // XXX can't request attention on wrapped surfaces } - fn set_theme(&self, theme: Option) {} + fn set_theme(&self, _theme: Option) {} fn theme(&self) -> Option { None } - fn set_content_protected(&self, protected: bool) {} + fn set_content_protected(&self, _protected: bool) {} fn title(&self) -> String { String::new() @@ -420,14 +420,14 @@ impl winit::window::Window for SctkWinitWindow { fn set_cursor_position( &self, - position: winit::dpi::Position, + _position: winit::dpi::Position, ) -> Result<(), winit::error::RequestError> { todo!() } fn set_cursor_grab( &self, - mode: winit::window::CursorGrabMode, + _mode: winit::window::CursorGrabMode, ) -> Result<(), winit::error::RequestError> { todo!() } @@ -438,7 +438,7 @@ impl winit::window::Window for SctkWinitWindow { fn request_ime_update( &self, - request: winit::window::ImeRequest, + _request: winit::window::ImeRequest, ) -> Result<(), winit::window::ImeRequestError> { todo!() } diff --git a/winit/src/proxy.rs b/winit/src/proxy.rs index a3e4e816..e65de2aa 100644 --- a/winit/src/proxy.rs +++ b/winit/src/proxy.rs @@ -8,7 +8,6 @@ use crate::futures::futures::{ use crate::graphics::shell; use crate::runtime::Action; use crate::runtime::window; -use std::hash::DefaultHasher; use std::pin::Pin; /// An event loop proxy with backpressure that implements `Sink`. From aa1c2593acf2409b6cd445c47adf393caa26f169 Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 18:11:19 +0200 Subject: [PATCH 07/15] =?UTF-8?q?yoda:=20iced=5Fwinit=20unreachable=20+=20?= =?UTF-8?q?deprecation=20cleanup=20(45=E2=86=9229=20warnings)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- winit/src/conversion.rs | 6 ++---- winit/src/lib.rs | 2 ++ winit/src/platform_specific/wayland/mod.rs | 5 ++--- winit/src/window.rs | 5 +++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 0afb8e72..71af6e2e 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -640,10 +640,6 @@ pub fn mouse_interaction( Interaction::AllScroll => winit_core::cursor::CursorIcon::AllScroll, Interaction::ZoomIn => winit_core::cursor::CursorIcon::ZoomIn, Interaction::ZoomOut => winit_core::cursor::CursorIcon::ZoomOut, - Interaction::Cell => winit_core::cursor::CursorIcon::Cell, - Interaction::Move => winit_core::cursor::CursorIcon::Move, - Interaction::Copy => winit_core::cursor::CursorIcon::Copy, - Interaction::Help => winit_core::cursor::CursorIcon::Help, Interaction::Hidden => { return None; } @@ -1079,6 +1075,7 @@ pub fn physical_key( /// /// [`winit`]: https://github.com/rust-windowing/winit /// [`iced`]: https://github.com/iced-rs/iced/tree/0.12 +#[allow(deprecated)] // KeyCode::Super/Hyper/Turbo: legacy spec, no Meta variant in this enum pub fn key_code( key_code: winit::keyboard::KeyCode, ) -> Option { @@ -1283,6 +1280,7 @@ pub fn key_code( }) } +#[allow(deprecated)] // KeyCode::Super/Hyper/Turbo: legacy spec, no Meta variant in this enum pub fn winit_key_code( key_code: keyboard::key::Code, ) -> Option { diff --git a/winit/src/lib.rs b/winit/src/lib.rs index 5b5d1ce1..32837143 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -362,6 +362,8 @@ where where F: Future, { + // TODO(yoda): migrate try_next → try_recv (futures-channel API change). + #[allow(deprecated)] fn process_event( &mut self, event_loop: &dyn winit::event_loop::ActiveEventLoop, diff --git a/winit/src/platform_specific/wayland/mod.rs b/winit/src/platform_specific/wayland/mod.rs index 321561da..82304b7c 100644 --- a/winit/src/platform_specific/wayland/mod.rs +++ b/winit/src/platform_specific/wayland/mod.rs @@ -18,8 +18,7 @@ use cursor_icon::CursorIcon; use iced_futures::futures::channel::mpsc; use iced_graphics::{Compositor, compositor}; use iced_runtime::core::{Vector, window}; -use raw_window_handle::{HasDisplayHandle, HasWindowHandle}; -use raw_window_handle::{HasRawDisplayHandle, RawWindowHandle}; +use raw_window_handle::{HasDisplayHandle, HasWindowHandle, RawWindowHandle}; use sctk_event::SctkEvent; use std::{collections::HashMap, sync::Arc}; use subsurface_widget::{SubsurfaceInstance, SubsurfaceState}; @@ -106,7 +105,7 @@ impl PlatformSpecific { display: OwnedDisplayHandle, ) -> Self { self.wayland.winit_event_sender = Some(tx); - self.wayland.conn = match display.raw_display_handle() { + self.wayland.conn = match display.display_handle().map(|h| h.as_raw()) { Ok(raw_window_handle::RawDisplayHandle::Wayland( wayland_display_handle, )) => { diff --git a/winit/src/window.rs b/winit/src/window.rs index 87d35a5a..89368802 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -325,6 +325,10 @@ where } } + // TODO(yoda): migrate to Window::request_ime_update(ImeRequest::*). + // Legacy set_ime_* still functional but deprecated; full migration + // requires ImeCapabilities + ImeRequestData reshape. + #[allow(deprecated)] fn enable_ime( &mut self, cursor: Rectangle, @@ -355,6 +359,7 @@ where } } + #[allow(deprecated)] // see TODO on enable_ime fn disable_ime(&mut self) { if self.ime_state.is_some() { self.raw.set_ime_allowed(false); From e424487704912e05a526a213076793074dbfdc0e Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 18:26:08 +0200 Subject: [PATCH 08/15] =?UTF-8?q?yoda:=20iced=5Fwinit=20dead-code=20purge?= =?UTF-8?q?=20(29=E2=86=920=20warnings)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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::new: 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: #[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 --- winit/src/a11y.rs | 6 +- winit/src/conversion.rs | 7 +- winit/src/lib.rs | 28 ++------ winit/src/platform_specific/mod.rs | 2 +- .../wayland/event_loop/control_flow.rs | 56 ---------------- .../wayland/event_loop/mod.rs | 6 +- .../wayland/event_loop/proxy.rs | 66 ------------------- .../wayland/event_loop/state.rs | 11 +--- winit/src/platform_specific/wayland/mod.rs | 2 +- .../platform_specific/wayland/sctk_event.rs | 4 +- .../wayland/subsurface_widget.rs | 3 +- winit/src/proxy.rs | 2 +- winit/src/window.rs | 6 +- 13 files changed, 22 insertions(+), 177 deletions(-) delete mode 100644 winit/src/platform_specific/wayland/event_loop/control_flow.rs delete mode 100644 winit/src/platform_specific/wayland/event_loop/proxy.rs diff --git a/winit/src/a11y.rs b/winit/src/a11y.rs index 61fbe630..8f6cf27b 100644 --- a/winit/src/a11y.rs +++ b/winit/src/a11y.rs @@ -7,7 +7,7 @@ use iced_accessibility::accesskit::{ use iced_runtime::core; pub struct WinitActivationHandler { - pub proxy: mpsc::UnboundedSender, + pub(crate) proxy: mpsc::UnboundedSender, pub title: String, } @@ -33,7 +33,7 @@ impl ActivationHandler for WinitActivationHandler { pub struct WinitActionHandler { pub id: core::window::Id, - pub proxy: mpsc::UnboundedSender, + pub(crate) proxy: mpsc::UnboundedSender, } impl iced_accessibility::accesskit::ActionHandler for WinitActionHandler { @@ -48,7 +48,7 @@ impl iced_accessibility::accesskit::ActionHandler for WinitActionHandler { } pub struct WinitDeactivationHandler { - pub proxy: mpsc::UnboundedSender, + pub(crate) proxy: mpsc::UnboundedSender, } impl iced_accessibility::accesskit::DeactivationHandler diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 71af6e2e..5192cb61 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -3,8 +3,6 @@ //! [`winit`]: https://github.com/rust-windowing/winit //! [`iced_runtime`]: https://github.com/iced-rs/iced/tree/0.14/runtime use crate::core::input_method; -use std::hash::Hash; -use std::hash::Hasher; use std::sync::Arc; use crate::core::keyboard; @@ -698,7 +696,7 @@ enum TouchInternal { /// /// [`winit`]: https://github.com/rust-windowing/winit /// [`iced`]: https://github.com/iced-rs/iced/tree/0.12 -pub fn touch_event( +fn touch_event( finger: FingerId, state: TouchInternal, _force: Option, @@ -1591,7 +1589,10 @@ pub fn resize_direction( } } +// Fields are passed through to winit via `IconProvider: AsAny` for potential +// downcast; they are not read directly here. #[derive(Debug)] +#[allow(dead_code)] pub struct RawImage(Vec, Size); impl IconProvider for RawImage {} impl From for winit_core::icon::Icon { diff --git a/winit/src/lib.rs b/winit/src/lib.rs index 32837143..3c5a5d29 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -157,7 +157,8 @@ where let (boot_sender, boot_receiver) = oneshot::channel(); let (control_sender, control_receiver) = mpsc::unbounded(); - let (system_theme_sender, system_theme_receiver) = oneshot::channel(); + // Sender side currently not wired to a producer; receiver gets default. + let (_system_theme_sender, system_theme_receiver) = oneshot::channel(); let instance = Box::pin(run_instance::

( program, @@ -178,9 +179,6 @@ where struct BootConfig { sender: oneshot::Sender<()>, - fonts: Vec>, - graphics_settings: graphics::Settings, - is_wayland: bool, } struct Runner { instance: std::pin::Pin>, @@ -190,7 +188,6 @@ where sender: mpsc::UnboundedSender>, receiver: mpsc::UnboundedReceiver, error: Option, - system_theme: Option>, control_sender: mpsc::UnboundedSender, #[cfg(feature = "a11y")] @@ -207,16 +204,12 @@ where context, boot: Some(BootConfig { sender: boot_sender, - fonts: settings.fonts, - graphics_settings, - is_wayland, }), id: settings.id, sender: event_sender, receiver: control_receiver, control_sender: control_sender.clone(), error: None, - system_theme: Some(system_theme_sender), #[cfg(feature = "a11y")] adapters: Default::default(), @@ -319,12 +312,7 @@ where event_loop: &dyn winit::event_loop::ActiveEventLoop, ) { // create initial window - let Some(BootConfig { - sender, - fonts: _, - graphics_settings: _, - is_wayland: _, - }) = self.boot.take() + let Some(BootConfig { sender }) = self.boot.take() else { return; }; @@ -691,6 +679,7 @@ where } } +#[allow(hidden_glob_reexports)] // intentional: internal Event shadows winit::event::Event from `pub use winit` enum Event { WindowCreated { id: window::Id, @@ -798,9 +787,6 @@ async fn run_instance

( > = None; let mut dnd_surface_id: Option = None; - #[cfg(feature = "a11y")] - let mut a11y_enabled = false; - #[cfg(all(feature = "linux-theme-detection", target_os = "linux"))] let mut system_theme = { let to_mode = |color_scheme| match color_scheme { @@ -1393,7 +1379,6 @@ async fn run_instance

( } let mut uis_stale = false; - let mut resized = false; for (id, window) in window_manager.iter_mut() { if skip && !window.resize_enabled { continue; @@ -1446,7 +1431,6 @@ async fn run_instance

( // FIXME what to do when we are stuck in a configure event/resize request loop // We don't have control over how winit handles this. window.resize_enabled = true; - resized = true; needs_redraw = true; let s = winit::dpi::Size::Logical( requested_size.cast(), @@ -1661,8 +1645,8 @@ async fn run_instance

( events.push((Some(id), conversion::a11y(action_request))); } #[cfg(feature = "a11y")] - Event::AccessibilityEnabled(enabled) => { - a11y_enabled = enabled; + Event::AccessibilityEnabled(_enabled) => { + // a11y enable signal currently unused at this layer } Event::PlatformSpecific(e) => { crate::platform_specific::handle_event( diff --git a/winit/src/platform_specific/mod.rs b/winit/src/platform_specific/mod.rs index 66eda20c..357fb1ec 100644 --- a/winit/src/platform_specific/mod.rs +++ b/winit/src/platform_specific/mod.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; -use iced_graphics::{Compositor, compositor}; +use iced_graphics::compositor; use iced_runtime::{ core::{Vector, window}, user_interface, }; diff --git a/winit/src/platform_specific/wayland/event_loop/control_flow.rs b/winit/src/platform_specific/wayland/event_loop/control_flow.rs deleted file mode 100644 index bc920ed4..00000000 --- a/winit/src/platform_specific/wayland/event_loop/control_flow.rs +++ /dev/null @@ -1,56 +0,0 @@ -/// Set by the user callback given to the [`EventLoop::run`] method. -/// -/// Indicates the desired behavior of the event loop after [`Event::RedrawEventsCleared`] is emitted. -/// -/// Defaults to [`Poll`]. -/// -/// ## Persistency -/// -/// Almost every change is persistent between multiple calls to the event loop closure within a -/// given run loop. The only exception to this is [`ExitWithCode`] which, once set, cannot be unset. -/// Changes are **not** persistent between multiple calls to `run_return` - issuing a new call will -/// reset the control flow to [`Poll`]. -/// -/// [`ExitWithCode`]: Self::ExitWithCode -/// [`Poll`]: Self::Poll -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub enum ControlFlow { - /// When the current loop iteration finishes, immediately begin a new iteration regardless of - /// whether or not new events are available to process. - /// - /// ## Platform-specific - /// - /// - **Web:** Events are queued and usually sent when `requestAnimationFrame` fires but sometimes - /// the events in the queue may be sent before the next `requestAnimationFrame` callback, for - /// example when the scaling of the page has changed. This should be treated as an implementation - /// detail which should not be relied on. - Poll, - /// When the current loop iteration finishes, suspend the thread until another event arrives. - Wait, - /// When the current loop iteration finishes, suspend the thread until either another event - /// arrives or the given time is reached. - /// - /// Useful for implementing efficient timers. Applications which want to render at the display's - /// native refresh rate should instead use [`Poll`] and the VSync functionality of a graphics API - /// to reduce odds of missed frames. - /// - /// [`Poll`]: Self::Poll - WaitUntil(std::time::Instant), - /// Send a [`LoopDestroyed`] event and stop the event loop. This variant is *sticky* - once set, - /// `control_flow` cannot be changed from `ExitWithCode`, and any future attempts to do so will - /// result in the `control_flow` parameter being reset to `ExitWithCode`. - /// - /// The contained number will be used as exit code. The [`Exit`] constant is a shortcut for this - /// with exit code 0. - /// - /// ## Platform-specific - /// - /// - **Android / iOS / WASM:** The supplied exit code is unused. - /// - **Unix:** On most Unix-like platforms, only the 8 least significant bits will be used, - /// which can cause surprises with negative exit values (`-42` would end up as `214`). See - /// [`std::process::exit`]. - /// - /// [`LoopDestroyed`]: Event::LoopDestroyed - /// [`Exit`]: ControlFlow::Exit - ExitWithCode(i32), -} diff --git a/winit/src/platform_specific/wayland/event_loop/mod.rs b/winit/src/platform_specific/wayland/event_loop/mod.rs index 87d00ec2..d21edcea 100644 --- a/winit/src/platform_specific/wayland/event_loop/mod.rs +++ b/winit/src/platform_specific/wayland/event_loop/mod.rs @@ -1,5 +1,3 @@ -pub mod control_flow; -pub mod proxy; pub mod state; use crate::{ @@ -28,7 +26,7 @@ use cctk::{ reexports::{ calloop::{self, EventLoop}, client::{ - ConnectError, Connection, Proxy, globals::registry_queue_init, + Connection, Proxy, globals::registry_queue_init, }, }, registry::RegistryState, @@ -64,8 +62,8 @@ pub struct SctkEventLoop { pub(crate) state: SctkState, } +#[allow(dead_code)] // payloads kept for Debug; not inspected programmatically pub enum Error { - Connect(ConnectError), Calloop(calloop::Error), Global(GlobalError), NoDisplayHandle, diff --git a/winit/src/platform_specific/wayland/event_loop/proxy.rs b/winit/src/platform_specific/wayland/event_loop/proxy.rs deleted file mode 100644 index bdbc44a4..00000000 --- a/winit/src/platform_specific/wayland/event_loop/proxy.rs +++ /dev/null @@ -1,66 +0,0 @@ -use cctk::sctk::reexports::calloop; -use iced_futures::futures::{ - channel::mpsc, - task::{Context, Poll}, - Sink, -}; -use std::pin::Pin; - -/// An event loop proxy that implements `Sink`. -#[derive(Debug)] -pub struct Proxy { - raw: calloop::channel::Sender, -} - -impl Clone for Proxy { - fn clone(&self) -> Self { - Self { - raw: self.raw.clone(), - } - } -} - -impl Proxy { - /// Creates a new [`Proxy`] from an `EventLoopProxy`. - pub fn new(raw: calloop::channel::Sender) -> Self { - Self { raw } - } - /// send an event - pub fn send_event(&self, message: Message) { - let _ = self.raw.send(message); - } -} - -impl Sink for Proxy { - type Error = mpsc::SendError; - - fn poll_ready( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - - fn start_send( - self: Pin<&mut Self>, - message: Message, - ) -> Result<(), Self::Error> { - let _ = self.raw.send(message); - - Ok(()) - } - - fn poll_flush( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - - fn poll_close( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } -} diff --git a/winit/src/platform_specific/wayland/event_loop/state.rs b/winit/src/platform_specific/wayland/event_loop/state.rs index 3d93a015..8be7c639 100644 --- a/winit/src/platform_specific/wayland/event_loop/state.rs +++ b/winit/src/platform_specific/wayland/event_loop/state.rs @@ -33,7 +33,7 @@ use std::{ }; use wayland_backend::client::ObjectId; use winit::{ - dpi::{LogicalPosition, LogicalSize}, + dpi::LogicalSize, platform::wayland::WindowExtWayland, }; @@ -229,9 +229,6 @@ impl CommonSurface { #[derive(Debug, Clone)] pub struct Common { pub(crate) fractional_scale: Option, - pub(crate) has_focus: bool, - pub(crate) ime_pos: LogicalPosition, - pub(crate) ime_size: LogicalSize, pub(crate) size: LogicalSize, pub(crate) requested_size: (Option, Option), pub(crate) wp_viewport: Option, @@ -241,9 +238,6 @@ impl Default for Common { fn default() -> Self { Self { fractional_scale: Default::default(), - has_focus: Default::default(), - ime_pos: Default::default(), - ime_size: Default::default(), size: LogicalSize::new(1, 1), requested_size: (None, None), wp_viewport: None, @@ -336,7 +330,6 @@ pub struct SctkPopupData { pub(crate) parent: PopupParent, pub(crate) toplevel: WlSurface, pub(crate) positioner: Arc, - pub(crate) grab: bool, } #[derive(Debug)] @@ -877,7 +870,6 @@ impl SctkState { parent: parent.clone(), toplevel: toplevel.clone(), positioner: positioner.clone(), - grab: settings.grab, }, last_configure: None, _pending_requests: Default::default(), @@ -1519,7 +1511,6 @@ impl SctkState { SctkEvent::SubsurfaceEvent (crate::sctk_event::SubsurfaceEventVariant::Created{ parent_id, parent, - surface: subsurface, qh: self.queue_handle.clone(), common_surface, surface_id: subsurface_settings.id, diff --git a/winit/src/platform_specific/wayland/mod.rs b/winit/src/platform_specific/wayland/mod.rs index 82304b7c..e613e3b4 100644 --- a/winit/src/platform_specific/wayland/mod.rs +++ b/winit/src/platform_specific/wayland/mod.rs @@ -16,7 +16,7 @@ use cctk::sctk::reexports::client::protocol::wl_surface::WlSurface; use cctk::sctk::seat::keyboard::Modifiers; use cursor_icon::CursorIcon; use iced_futures::futures::channel::mpsc; -use iced_graphics::{Compositor, compositor}; +use iced_graphics::compositor; use iced_runtime::core::{Vector, window}; use raw_window_handle::{HasDisplayHandle, HasWindowHandle, RawWindowHandle}; use sctk_event::SctkEvent; diff --git a/winit/src/platform_specific/wayland/sctk_event.rs b/winit/src/platform_specific/wayland/sctk_event.rs index 8c2b24df..a11ebe66 100755 --- a/winit/src/platform_specific/wayland/sctk_event.rs +++ b/winit/src/platform_specific/wayland/sctk_event.rs @@ -27,7 +27,7 @@ use iced_futures::{ }, futures::{SinkExt, channel::mpsc}, }; -use iced_graphics::{Compositor, compositor}; +use iced_graphics::compositor; use iced_runtime::{ core::{ Point, @@ -282,7 +282,6 @@ pub enum SubsurfaceEventVariant { Created { parent_id: window::Id, parent: WlSurface, - surface: WlSurface, qh: QueueHandle, common_surface: CommonSurface, surface_id: SurfaceId, @@ -1503,7 +1502,6 @@ impl SctkEvent { common, z, parent, - surface: _, qh, surface_id, display, diff --git a/winit/src/platform_specific/wayland/subsurface_widget.rs b/winit/src/platform_specific/wayland/subsurface_widget.rs index 7f15854b..c09e2424 100644 --- a/winit/src/platform_specific/wayland/subsurface_widget.rs +++ b/winit/src/platform_specific/wayland/subsurface_widget.rs @@ -7,7 +7,6 @@ use crate::core::{ widget::{self, Widget}, }; use std::{ - borrow::BorrowMut, cell::RefCell, collections::HashMap, fmt::Debug, @@ -624,7 +623,7 @@ impl Drop for SubsurfaceState { } #[derive(Clone, Debug)] -pub(crate) struct SubsurfaceInstance { +pub struct SubsurfaceInstance { pub(crate) wl_surface: WlSurface, pub(crate) wl_subsurface: WlSubsurface, pub(crate) wp_viewport: WpViewport, diff --git a/winit/src/proxy.rs b/winit/src/proxy.rs index e65de2aa..aabe15c3 100644 --- a/winit/src/proxy.rs +++ b/winit/src/proxy.rs @@ -33,7 +33,7 @@ impl Proxy { const MAX_SIZE: usize = 100; /// Creates a new [`Proxy`] from an `EventLoopProxy`. - pub fn new( + pub(crate) fn new( raw: winit::event_loop::EventLoopProxy, event_sender: mpsc::UnboundedSender>, ) -> (Self, impl Future) { diff --git a/winit/src/window.rs b/winit/src/window.rs index 89368802..ecb2107a 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -14,7 +14,7 @@ use crate::core::text; use crate::core::theme::{self, Base}; use crate::core::time::Instant; use crate::core::{ - Color, Element, InputMethod, Padding, Point, Rectangle, Size, Text, Vector, + Color, InputMethod, Padding, Point, Rectangle, Size, Text, Vector, }; use crate::graphics::Compositor; use crate::program::{self, Program}; @@ -26,10 +26,6 @@ use winit::monitor::MonitorHandle; use std::collections::BTreeMap; use std::sync::Arc; -pub(crate) type ViewFn = Arc< - Box Option> + Send + Sync + 'static>, ->; - pub struct WindowManager where P: Program, From d33d068c17e3a16d2444917820682f934faaa299 Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 18:38:57 +0200 Subject: [PATCH 09/15] =?UTF-8?q?yoda:=20iced=5Fwidget=20cleanup=20(7?= =?UTF-8?q?=E2=86=920=20warnings)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - overlay/menu.rs:578: real bug fix — List::draw was rendering with text::Wrapping::default() instead of the configured self.text_wrap. Wiring it through eliminates the 'field never read' warning AND honors the wrap setting that was being silently dropped. - slider.rs:735-744: replace `if let Ok(x) = …try_into() { … }` with irrefutable `let Ok(x) = …try_into();` (the conversion is provably Infallible at the call site). Same behavior, no compiler noise. - lazy.rs:8 / lazy/component.rs:13: drop unused `iced_renderer::core::widget::Operation` imports. Leyoda 2026 – GPLv3 --- widget/src/lazy.rs | 1 - widget/src/lazy/component.rs | 1 - widget/src/overlay/menu.rs | 2 +- widget/src/slider.rs | 20 ++++++++------------ 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/widget/src/lazy.rs b/widget/src/lazy.rs index 7a2611ee..b4db46a5 100644 --- a/widget/src/lazy.rs +++ b/widget/src/lazy.rs @@ -5,7 +5,6 @@ pub mod component; #[allow(deprecated)] pub use component::Component; -use iced_renderer::core::widget::Operation; mod cache; diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs index 682fd458..b3c51f37 100644 --- a/widget/src/lazy/component.rs +++ b/widget/src/lazy/component.rs @@ -10,7 +10,6 @@ use crate::core::{ self, Clipboard, Element, Length, Rectangle, Shell, Size, Vector, Widget, }; -use iced_renderer::core::widget::Operation; use ouroboros::self_referencing; use std::cell::RefCell; use std::marker::PhantomData; diff --git a/widget/src/overlay/menu.rs b/widget/src/overlay/menu.rs index 94d2b6ad..e7c4dc23 100644 --- a/widget/src/overlay/menu.rs +++ b/widget/src/overlay/menu.rs @@ -575,7 +575,7 @@ where align_x: text::Alignment::Default, align_y: alignment::Vertical::Center, shaping: self.text_shaping, - wrapping: text::Wrapping::default(), + wrapping: self.text_wrap, ellipsize: text::Ellipsize::default(), }, Point::new(bounds.x + self.padding.left, bounds.center_y()), diff --git a/widget/src/slider.rs b/widget/src/slider.rs index e3fe484a..9516f55c 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -732,18 +732,14 @@ where node.set_labelled_by(label.clone()); } - if let Ok(min) = self.range.start().clone().try_into() { - node.set_min_numeric_value(min); - } - if let Ok(max) = self.range.end().clone().try_into() { - node.set_max_numeric_value(max); - } - if let Ok(value) = self.value.clone().try_into() { - node.set_numeric_value(value); - } - if let Ok(step) = self.step.clone().try_into() { - node.set_numeric_value_step(step); - } + let Ok(min) = self.range.start().clone().try_into(); + node.set_min_numeric_value(min); + let Ok(max) = self.range.end().clone().try_into(); + node.set_max_numeric_value(max); + let Ok(value) = self.value.clone().try_into(); + node.set_numeric_value(value); + let Ok(step) = self.step.clone().try_into(); + node.set_numeric_value_step(step); // TODO: This could be a setting on the slider node.set_live(iced_accessibility::accesskit::Live::Polite); From 6b069b2b4bc252d8fdc4d2a93ff533376c4f0dee Mon Sep 17 00:00:00 2001 From: Votre Nom Date: Tue, 5 May 2026 18:45:49 +0200 Subject: [PATCH 10/15] =?UTF-8?q?yoda:=20iced=5Fcore=20+=20iced=5Fwgpu=20c?= =?UTF-8?q?leanup=20(3=E2=86=920=20warnings)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iced_core/settings.rs: drop dead `From for iced_winit::Settings` impl gated behind a `winit` feature that doesn't exist on iced_core (and shouldn't — that would invert the dep direction). The impl was unreachable code. iced_wgpu/window/compositor.rs: collapse the unused initial `adapter_options` declaration into the only branch that uses it (the fallback path that re-creates the instance with GL allowed). The original allocation was always re-assigned before being read. iced_wgpu/lib.rs: remove `Renderer::draw_overlay` — private debug method with no caller anywhere in the workspace. cargo fix then dropped the imports that became orphans (Color, Size, Vector, alignment). Leyoda 2026 – GPLv3 --- core/src/settings.rs | 10 -------- wgpu/src/lib.rs | 46 +---------------------------------- wgpu/src/window/compositor.rs | 8 +----- 3 files changed, 2 insertions(+), 62 deletions(-) diff --git a/core/src/settings.rs b/core/src/settings.rs index be744b36..2ee1021d 100644 --- a/core/src/settings.rs +++ b/core/src/settings.rs @@ -63,13 +63,3 @@ impl Default for Settings { } } -#[cfg(feature = "winit")] -impl From for iced_winit::Settings { - fn from(settings: Settings) -> iced_winit::Settings { - iced_winit::Settings { - id: settings.id, - fonts: settings.fonts, - is_daemon: settings.is_daemon, - } - } -} diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 830f9911..4b22ad0a 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -65,7 +65,7 @@ pub use geometry::Geometry; use crate::core::renderer; use crate::core::{ Background, Color, Font, Pixels, Point, Rectangle, Size, - Transformation, Vector, + Transformation, }; use crate::graphics::mesh; use crate::graphics::text::{Editor, Paragraph}; @@ -671,50 +671,6 @@ impl Renderer { }); } - fn draw_overlay( - &mut self, - overlay: &[impl AsRef], - viewport: &Viewport, - ) { - use crate::core::Renderer as _; - use crate::core::alignment; - use crate::core::text::Renderer as _; - - self.with_layer( - Rectangle::with_size(viewport.logical_size()), - |renderer| { - for (i, line) in overlay.iter().enumerate() { - let text = crate::core::Text { - content: line.as_ref().to_owned(), - bounds: viewport.logical_size(), - size: Pixels(20.0), - line_height: core::text::LineHeight::default(), - font: Font::MONOSPACE, - align_x: core::text::Alignment::Left, - align_y: alignment::Vertical::Top, - shaping: core::text::Shaping::Advanced, - wrapping: core::text::Wrapping::Word, - ellipsize: core::text::Ellipsize::None, - }; - - renderer.fill_text( - text.clone(), - Point::new(11.0, 11.0 + 25.0 * i as f32), - Color::from_rgba(0.9, 0.9, 0.9, 1.0), - Rectangle::with_size(Size::INFINITE), - ); - - renderer.fill_text( - text, - Point::new(11.0, 11.0 + 25.0 * i as f32) - + Vector::new(-1.0, -1.0), - Color::BLACK, - Rectangle::with_size(Size::INFINITE), - ); - } - }, - ); - } } impl core::Renderer for Renderer { diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index 56c01980..a7009d14 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -138,12 +138,6 @@ impl Compositor { .clone() .and_then(|window| instance.create_surface(window).ok()); - let mut adapter_options = wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::from_env() - .unwrap_or(wgpu::PowerPreference::HighPerformance), - compatible_surface: compatible_surface.as_ref(), - force_fallback_adapter: false, - }; let mut adapter = None; #[cfg_attr(not(unix), allow(dead_code))] if std::env::var_os("WGPU_ADAPTER_NAME").is_none() { @@ -205,7 +199,7 @@ impl Compositor { .await; compatible_surface = compatible_window .and_then(|window| instance.create_surface(window).ok()); - adapter_options = wgpu::RequestAdapterOptions { + let adapter_options = wgpu::RequestAdapterOptions { power_preference: wgpu::PowerPreference::from_env() .unwrap_or(wgpu::PowerPreference::HighPerformance), compatible_surface: compatible_surface.as_ref(), From f4870187088a14d398f2075c5ccda611387dcdcc Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Sat, 23 May 2026 20:55:59 +0200 Subject: [PATCH 11/15] chore: gate accessibility-only winit state --- winit/src/lib.rs | 4 +++- winit/src/window/state.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/winit/src/lib.rs b/winit/src/lib.rs index 3c5a5d29..9bc2db96 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -188,8 +188,9 @@ where sender: mpsc::UnboundedSender>, receiver: mpsc::UnboundedReceiver, error: Option, + #[cfg(feature = "a11y")] control_sender: mpsc::UnboundedSender, - + #[cfg(feature = "a11y")] adapters: std::collections::HashMap, @@ -208,6 +209,7 @@ where id: settings.id, sender: event_sender, receiver: control_receiver, + #[cfg(feature = "a11y")] control_sender: control_sender.clone(), error: None, diff --git a/winit/src/window/state.rs b/winit/src/window/state.rs index 98fdf9ee..1e16fc51 100644 --- a/winit/src/window/state.rs +++ b/winit/src/window/state.rs @@ -97,6 +97,7 @@ where self.ready = ready; } + #[cfg(feature = "a11y")] pub(crate) fn set_a11y_ready(&mut self, ready: bool) { self.a11y_ready = ready; } From 81639935398a856f3164dc406fbac78922c258fc Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 11:35:03 +0200 Subject: [PATCH 12/15] chore: refresh lockfile for local clipboard fork --- Cargo.lock | 60 +++++------------------------------------------------- 1 file changed, 5 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9fddcd2e..0a138409 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1071,7 +1071,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" +source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "objc", "objc-foundation", @@ -1081,22 +1081,13 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" +source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "dnd", "mime 0.1.0", "smithay-clipboard", ] -[[package]] -name = "clipboard_x11" -version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" -dependencies = [ - "thiserror 1.0.69", - "x11rb", -] - [[package]] name = "clock" version = "0.1.0" @@ -1617,7 +1608,7 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" +source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "bitflags 2.11.0", "mime 0.1.0", @@ -1654,45 +1645,12 @@ name = "dpi" version = "0.1.2" source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" -[[package]] -name = "drm" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" -dependencies = [ - "bitflags 2.11.0", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "rustix 0.38.44", -] - -[[package]] -name = "drm-ffi" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" -dependencies = [ - "drm-sys", - "rustix 0.38.44", -] - [[package]] name = "drm-fourcc" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" -[[package]] -name = "drm-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" -dependencies = [ - "libc", - "linux-raw-sys 0.6.5", -] - [[package]] name = "editor" version = "0.1.0" @@ -3829,12 +3787,6 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" -[[package]] -name = "linux-raw-sys" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -4060,7 +4012,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" +source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "smithay-clipboard", ] @@ -6366,7 +6318,6 @@ dependencies = [ "cfg_aliases", "cocoa", "core-graphics", - "drm", "fastrand", "foreign-types 0.5.0", "js-sys", @@ -8048,12 +7999,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#3a7af79e54db6854d8aa9d9e2866a9288d0f95d5" +source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", - "clipboard_x11", "dnd", "mime 0.1.0", "raw-window-handle", From 756e5691d770656e797511b1831b2a6b489d92e1 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 18:09:40 +0200 Subject: [PATCH 13/15] chore: use local cctk and clipboard crates --- Cargo.lock | 7 ------- Cargo.toml | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a138409..0f16532c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1071,7 +1071,6 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "objc", "objc-foundation", @@ -1081,7 +1080,6 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "dnd", "mime 0.1.0", @@ -1280,7 +1278,6 @@ dependencies = [ [[package]] name = "cosmic-client-toolkit" version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=160b086#160b086abe03cd34a8a375d7fbe47b24308d1f38" dependencies = [ "bitflags 2.11.0", "cosmic-protocols", @@ -1293,7 +1290,6 @@ dependencies = [ [[package]] name = "cosmic-protocols" version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=160b086#160b086abe03cd34a8a375d7fbe47b24308d1f38" dependencies = [ "bitflags 2.11.0", "wayland-backend", @@ -1608,7 +1604,6 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "bitflags 2.11.0", "mime 0.1.0", @@ -4012,7 +4007,6 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "smithay-clipboard", ] @@ -7999,7 +7993,6 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#319db02e5219c557c8f03b0e33a8eb4075cabb85" dependencies = [ "clipboard-win", "clipboard_macos", diff --git a/Cargo.toml b/Cargo.toml index 99841e8a..1cb6dd7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -275,7 +275,7 @@ tiny-skia = { version = "0.11", default-features = false, features = [ "std", "simd", ] } -cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "160b086" } +cctk = { path = "../../cosmic-protocols/client-toolkit", package = "cosmic-client-toolkit" } # Yoda: default-features=false drops softbuffer's x11 / x11-dlopen (pulled # tiny-xlib + as-raw-xcb-connection). The wayland + wayland-dlopen features # are re-activated via iced_tiny_skia's own `wayland` feature propagation. @@ -309,9 +309,9 @@ winapi = "0.3" # an opt-in feature. default-features=false + features=["wayland"] drops # clipboard_x11 + x11rb from the build. Branch yoda-x11-optional on # https://forge.aditua.com/leyoda/window_clipboard. -window_clipboard = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional", default-features = false, features = ["wayland"] } -dnd = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } -mime = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } +window_clipboard = { path = "../../window_clipboard", default-features = false, features = ["wayland"] } +dnd = { path = "../../window_clipboard/dnd" } +mime = { path = "../../window_clipboard/mime" } # Yoda: default-features = false drops winit's x11 default, which otherwise # pulls winit-x11, x11-dl, tiny-xlib, as-raw-xcb-connection. Our Wayland-only # fork doesn't need any of that — the wayland + wayland-dlopen features are From 12fd244e954c6e7e87bd4b9b8b5dd7aa2ab948d5 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 18:27:54 +0200 Subject: [PATCH 14/15] chore: use local glyphon and cosmic-text --- Cargo.lock | 5 ++--- Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f16532c..14fbd880 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1302,8 +1302,7 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.18.2" -source = "git+https://github.com/pop-os/cosmic-text.git#9a2ab09f06905e91f41d64ac6eee887726e7fd76" +version = "0.19.0" dependencies = [ "bitflags 2.11.0", "fontdb", @@ -1321,6 +1320,7 @@ dependencies = [ "unicode-linebreak", "unicode-script", "unicode-segmentation", + "unicode-width", ] [[package]] @@ -1427,7 +1427,6 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "cryoglyph" version = "0.1.0" -source = "git+https://github.com/pop-os/glyphon.git?tag=cosmic-0.14#c49de15bce4d8254ac136d1be9911960cc85ce12" dependencies = [ "cosmic-text", "etagere", diff --git a/Cargo.toml b/Cargo.toml index 1cb6dd7e..fd6b9ecb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -238,10 +238,10 @@ async-std = "1.0" bitflags = "2.5" bytemuck = { version = "1.0", features = ["derive"] } bytes = "1.6" -cosmic-text = { git = "https://github.com/pop-os/cosmic-text.git" } +cosmic-text = { path = "../../cosmic-text" } # cosmic-text = "0.10" dark-light = "1.0" -cryoglyph = { package = "cryoglyph", git = "https://github.com/pop-os/glyphon.git", tag = "cosmic-0.14" } +cryoglyph = { package = "cryoglyph", path = "../../glyphon" } resvg = "0.45" web-sys = "0.3.69" guillotiere = "0.6" From de1247123a631087d2f78831c99f5f1b66d5a582 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 19:36:22 +0200 Subject: [PATCH 15/15] chore: use local winit and softbuffer --- Cargo.lock | 14 -------------- Cargo.toml | 25 ++++++++++++++++++++++--- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14fbd880..3aa9a01d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1637,7 +1637,6 @@ dependencies = [ [[package]] name = "dpi" version = "0.1.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" [[package]] name = "drm-fourcc" @@ -6246,7 +6245,6 @@ dependencies = [ [[package]] name = "smithay-clipboard" version = "0.8.0" -source = "git+https://github.com/pop-os/smithay-clipboard?tag=sctk-0.20#859b02c88f45c554049a67c6ddeec1692ce0e20b" dependencies = [ "libc", "raw-window-handle", @@ -6304,7 +6302,6 @@ dependencies = [ [[package]] name = "softbuffer" version = "0.4.1" -source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb" dependencies = [ "as-raw-xcb-connection", "bytemuck", @@ -8563,7 +8560,6 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winit" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "cfg_aliases", @@ -8589,7 +8585,6 @@ dependencies = [ [[package]] name = "winit-android" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "android-activity", "bitflags 2.11.0", @@ -8604,7 +8599,6 @@ dependencies = [ [[package]] name = "winit-appkit" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "block2 0.6.2", @@ -8626,7 +8620,6 @@ dependencies = [ [[package]] name = "winit-common" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "memmap2 0.9.10", "objc2 0.6.4", @@ -8641,7 +8634,6 @@ dependencies = [ [[package]] name = "winit-core" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "cursor-icon", @@ -8655,7 +8647,6 @@ dependencies = [ [[package]] name = "winit-orbital" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "dpi", @@ -8671,7 +8662,6 @@ dependencies = [ [[package]] name = "winit-uikit" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "block2 0.6.2", @@ -8691,7 +8681,6 @@ dependencies = [ [[package]] name = "winit-wayland" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "ahash", "bitflags 2.11.0", @@ -8717,7 +8706,6 @@ dependencies = [ [[package]] name = "winit-web" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "atomic-waker", "bitflags 2.11.0", @@ -8739,7 +8727,6 @@ dependencies = [ [[package]] name = "winit-win32" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "cursor-icon", @@ -8755,7 +8742,6 @@ dependencies = [ [[package]] name = "winit-x11" version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#a610ac9c7a72b39ff102ed4d946291618dc725b6" dependencies = [ "bitflags 2.11.0", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index fd6b9ecb..488eb21f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -279,7 +279,7 @@ cctk = { path = "../../cosmic-protocols/client-toolkit", package = "cosmic-clien # Yoda: default-features=false drops softbuffer's x11 / x11-dlopen (pulled # tiny-xlib + as-raw-xcb-connection). The wayland + wayland-dlopen features # are re-activated via iced_tiny_skia's own `wayland` feature propagation. -softbuffer = { git = "https://github.com/pop-os/softbuffer", tag = "cosmic-4.0", default-features = false } +softbuffer = { path = "../../softbuffer", default-features = false } syntect = "5.2" tokio = "1.0" tracing = "0.1" @@ -316,10 +316,29 @@ mime = { path = "../../window_clipboard/mime" } # pulls winit-x11, x11-dl, tiny-xlib, as-raw-xcb-connection. Our Wayland-only # fork doesn't need any of that — the wayland + wayland-dlopen features are # re-enabled via iced_winit's own feature propagation from libcosmic-yoda. -winit = { git = "https://github.com/pop-os/winit.git", tag = "cosmic-0.14", default-features = false } -winit-core = { git = "https://github.com/pop-os/winit.git", tag = "cosmic-0.14" } +winit = { path = "../../winit/winit", default-features = false } +winit-core = { path = "../../winit/winit-core" } cursor-icon = "1.1.0" +[patch.'https://github.com/pop-os/softbuffer'] +softbuffer = { path = "../../softbuffer" } + +[patch.'https://github.com/pop-os/smithay-clipboard'] +smithay-clipboard = { path = "../../smithay-clipboard" } + +[patch.'https://github.com/pop-os/winit.git'] +dpi = { path = "../../winit/dpi" } +winit = { path = "../../winit/winit" } +winit-android = { path = "../../winit/winit-android" } +winit-appkit = { path = "../../winit/winit-appkit" } +winit-common = { path = "../../winit/winit-common" } +winit-core = { path = "../../winit/winit-core" } +winit-orbital = { path = "../../winit/winit-orbital" } +winit-uikit = { path = "../../winit/winit-uikit" } +winit-wayland = { path = "../../winit/winit-wayland" } +winit-web = { path = "../../winit/winit-web" } +winit-win32 = { path = "../../winit/winit-win32" } +winit-x11 = { path = "../../winit/winit-x11" } [workspace.lints.rust] rust_2018_idioms = { level = "deny", priority = -1 }