Commit graph

6755 commits

Author SHA1 Message Date
d9fe129f73 chore: use local winit and softbuffer
Some checks failed
Audit / vulnerabilities (push) Has been cancelled
Check / wasm (push) Has been cancelled
Check / widget (push) Has been cancelled
Document / all (push) Has been cancelled
Format / all (push) Has been cancelled
Lint / all (push) Has been cancelled
Test / all (macOS-latest, 1.88) (push) Has been cancelled
Test / all (macOS-latest, beta) (push) Has been cancelled
Test / all (macOS-latest, stable) (push) Has been cancelled
Test / all (ubuntu-latest, 1.88) (push) Has been cancelled
Test / all (ubuntu-latest, beta) (push) Has been cancelled
Test / all (ubuntu-latest, stable) (push) Has been cancelled
Test / all (windows-latest, 1.88) (push) Has been cancelled
Test / all (windows-latest, beta) (push) Has been cancelled
Test / all (windows-latest, stable) (push) Has been cancelled
2026-05-27 07:25:28 +02:00
18b7425059 chore: use local glyphon and cosmic-text 2026-05-27 07:24:18 +02:00
41d35a6112 chore: use local cctk and clipboard crates 2026-05-27 07:23:42 +02:00
baadbb1f72 chore: refresh lockfile for local clipboard fork 2026-05-27 07:23:42 +02:00
5962a0b421 chore: gate accessibility-only winit state 2026-05-27 07:21:20 +02:00
Votre Nom
0e56697239 yoda: iced_core + iced_wgpu cleanup (3→0 warnings)
iced_core/settings.rs: drop dead `From<Settings> 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
2026-05-27 07:21:20 +02:00
Votre Nom
0b77873749 yoda: iced_widget cleanup (7→0 warnings)
- 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
2026-05-27 07:21:20 +02:00
Votre Nom
12c870af7a yoda: iced_winit dead-code purge (29→0 warnings)
Removed code paths inherited from past refactors that no longer have any
reader:

- ViewFn type alias (window.rs)
- a11y_enabled flag and resized flag (lib.rs) — assigned but never read
- BootConfig.fonts/graphics_settings/is_wayland — already passed to
  run_instance(...) directly; the BootConfig copies were never read
- Runner.system_theme oneshot::Sender — stored but no producer ever
  wired; receiver side already falls back to default
- event_loop/control_flow.rs — local ControlFlow enum, all callers use
  winit::event_loop::ControlFlow
- event_loop/proxy.rs — Proxy<Message> never constructed
- Error::Connect(ConnectError) variant — never constructed
- Common.has_focus / ime_pos / ime_size — never read after assignment
- SctkPopupData.grab — replicated settings.grab, never read back
- SubsurfaceEventVariant::Created.surface field — destructure does
  `surface: _` everywhere, the value is unused

Visibility tightening:
- a11y.rs WinitActivationHandler / WinitActionHandler /
  WinitDeactivationHandler: pub proxy → pub(crate) proxy
- conversion::touch_event: pub → private (no external callers)
- proxy::Proxy:🆕 pub → pub(crate)

Allow attributes (intentional, not warning-suppression):
- conversion::RawImage: #[allow(dead_code)] — fields kept for
  IconProvider downcast-via-AsAny on winit's side
- event_loop::Error: #[allow(dead_code)] — variant payloads kept for
  Debug, never inspected programmatically
- lib.rs Event<Message>: #[allow(hidden_glob_reexports)] — intentional
  shadow of winit::event::Event coming from `pub use winit`
- window.rs/lib.rs: #[allow(deprecated)] on enable_ime/disable_ime/
  process_event with TODOs for set_ime_* → request_ime_update and
  try_next → try_recv migrations

Five orphan imports also removed (Hash/Hasher, BorrowMut, 3× Compositor).

Leyoda 2026 – GPLv3
2026-05-27 07:21:20 +02:00
Votre Nom
4b6a05931e yoda: iced_winit unreachable + deprecation cleanup (45→29 warnings)
- 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
2026-05-27 07:21:20 +02:00
Votre Nom
c6b0d3543b yoda: cargo fix --lib across all crates — drop ~115 trivial warnings
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
2026-05-27 07:21:20 +02:00
Votre Nom
125e43a203 yoda: point window_clipboard at public Forgejo fork
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
2026-05-27 07:20:10 +02:00
Votre Nom
4eea46bdd9 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.
2026-05-27 07:20:10 +02:00
8440b6c05b 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).
2026-05-27 07:20:10 +02:00
e742b0ea4c yoda: gate iced_wgpu x11 backend behind an opt-in feature
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.
2026-05-27 07:20:10 +02:00
ccfa1596a5 yoda: drop x11 default on winit workspace dep
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.
2026-05-27 07:20:04 +02:00
KENZ
aa2a870c35 fix: Forward wayland IME events in SCTK only when single-instance
Some checks failed
Audit / vulnerabilities (push) Has been cancelled
Test / all (ubuntu-latest, 1.88) (push) Has been cancelled
Build / todos_linux (push) Has been cancelled
Build / todos_windows (push) Has been cancelled
Build / todos_macos (push) Has been cancelled
Build / todos_raspberry (push) Has been cancelled
Check / wasm (push) Has been cancelled
Check / widget (push) Has been cancelled
Test / all (ubuntu-latest, beta) (push) Has been cancelled
Document / all (push) Has been cancelled
Format / all (push) Has been cancelled
Lint / all (push) Has been cancelled
Test / all (macOS-latest, 1.88) (push) Has been cancelled
Test / all (macOS-latest, beta) (push) Has been cancelled
Test / all (macOS-latest, stable) (push) Has been cancelled
Test / all (ubuntu-latest, stable) (push) Has been cancelled
Test / all (windows-latest, 1.88) (push) Has been cancelled
Test / all (windows-latest, beta) (push) Has been cancelled
Test / all (windows-latest, stable) (push) Has been cancelled
feature enabled
2026-04-18 16:12:59 -04:00
Ian Douglas Scott
8f10a3bd34 winit: Set WindowAttributesWayland without cctk feature
There doesn't seem to be any reason for this to require the `cctk`
feature?

Fixes the app ID, and therefore icon, for `cosmic-sync-gui`.
2026-04-16 12:59:35 -06:00
boloto1979
64b97077b7 fix(wayland): add mouse cursor entered event to SctkEvent 2026-04-16 12:27:46 -04:00
Ashley Wulber
13b8d3eab6 fix: just use 0 for position of blur rectangle 2026-04-14 23:21:27 -04:00
Ashley Wulber
1bf1e33317 improv(wayland): handle capabilities for ext_background_effect 2026-04-14 18:21:36 -04:00
Ashley Wulber
d2b2715835 feat: ext-background-effect blur 2026-04-14 18:21:36 -04:00
Hojjat
78caabba7e fix: load image synchronously if no callback is set
Some checks failed
Audit / vulnerabilities (push) Has been cancelled
Check / wasm (push) Has been cancelled
Check / widget (push) Has been cancelled
Document / all (push) Has been cancelled
Format / all (push) Has been cancelled
Lint / all (push) Has been cancelled
Test / all (macOS-latest, 1.88) (push) Has been cancelled
Test / all (macOS-latest, beta) (push) Has been cancelled
Test / all (macOS-latest, stable) (push) Has been cancelled
Test / all (ubuntu-latest, 1.88) (push) Has been cancelled
Test / all (ubuntu-latest, beta) (push) Has been cancelled
Test / all (ubuntu-latest, stable) (push) Has been cancelled
Test / all (windows-latest, 1.88) (push) Has been cancelled
Test / all (windows-latest, beta) (push) Has been cancelled
Test / all (windows-latest, stable) (push) Has been cancelled
2026-04-13 21:59:23 +02:00
Mateusz Mikuła
044496f652 Sort using more deterministic algorithm
`hypot` while useful for most of the cases, may break sorting
assumptions like deterministic comparison.
As seen in: https://github.com/pop-os/cosmic-launcher/issues/352

Add and use a new method that trades the performance for more
determinism.
2026-04-13 10:36:11 -04:00
Hojjat
fc6b46342b feat: dnd destination for stack widget 2026-04-10 22:13:43 -04:00
Ian Taylor
37f7eab8a3 Fix bounds check
Previous behavior: images larger that 2048px would have their bottom
right corners transparent because the info didn't get uploaded to the
GPU
2026-04-10 08:58:26 -04:00
Hojjat
7fd263d99e chore: update cosmic-text
Basic shaping falls back to the default SansSerif font if glyphs are
missing
2026-04-06 10:11:59 -04:00
Hojjat
ed9ad80e18 fix: if there's only one focusable item, don't unfocus 2026-04-03 18:59:41 -04:00
Hojjat
42fd5c76bb feat: focus wrap-around
The tab cycles around when we reach the last focusable
2026-04-03 18:59:41 -04:00
Ashley Wulber
2d4ede1597 Revert "chore: use crate for softbuffer"
This reverts commit 375b24c3c4.
2026-04-02 22:50:29 -04:00
Hojjat
42e3afb568 fix: double negative causing windows to never become ready 2026-04-01 21:59:58 -04:00
KENZ
84f3210819 Use base colors iff program style's background color is not opaque for IME preedit 2026-04-01 17:19:38 -04:00
KENZ
594ed5cfbe fix: Forward DeleteSurroundingText event in wayland backend 2026-04-01 17:18:08 -04:00
KENZ
d0ef1f9e85 Implement IME-related methods of SctkWinitWindow for apps using single-instance feature
- At least, following apps are using `single-instance` feature:
  - cosmic-launcher
  - cosmic-app-library
- Once libcosmic text widgets supported the IME, these apps start hitting following methods of SctkWinitWindow which is `todo!()` and will crash at startup:
  - `set_ime_cursor_area()`
  - `set_ime_allowed()`
  - `set_ime_purpose()`
- So, this PR implements these method utilizing following wayland protocols.
  - zwp_text_input_v3
  - zwp_text_input_manager_v3
2026-04-01 17:18:08 -04:00
Ashley Wulber
e4da5002ae fix: a11y_ready state for sctk surfaces 2026-04-01 17:12:17 -04:00
Vukašin Vojinović
04c273a79b chore: add functions for row/column
This matches the libcosmic ones (e.g `row::with_children()`, instead of `Row::with_children()`).
2026-04-01 20:31:22 +02:00
Hojjat
f141c3ce5c fix: support Unicode/non-ASCII scripts in combo_box search 2026-04-01 12:59:26 -04:00
Hojjat
9b2857083e feat: Add rtl support to text input 2026-04-01 12:59:26 -04:00
Hojjat
de2982b37e chore: update cosmic-text 2026-04-01 12:59:26 -04:00
Ashley Wulber
e981b9c312 fix: rustix fs feature 2026-04-01 12:42:44 -04:00
Vukašin Vojinović
375b24c3c4 chore: use crate for softbuffer
This matches upstream iced, and all the things from that tag seem to already be upstream in `softbuffer`.
2026-04-01 10:22:16 -04:00
Hojjat
be453292c6 chore: Update to the latest cosmic-text 2026-03-31 14:54:53 -04:00
Hojjat
bc40cde8cb fix: do not subtract the scroll twice, causing highlight mis-alignment 2026-03-31 14:54:53 -04:00
Hojjat
e1fc659e64 fix: use highlight and cursor from cosmic-text editor
This fixes RTL text in the text_editor widget.
2026-03-31 14:54:53 -04:00
Ashley Wulber
1fdd24ab99 fix: feature gates 2026-03-30 18:47:47 -04:00
Ashley Wulber
d4b0c0482b fix: ensure adapter is created before window is marked visible 2026-03-30 18:47:47 -04:00
Ashley Wulber
5fa8b72a21 fix: mark window ready after adapter created 2026-03-30 18:47:47 -04:00
Ashley Wulber
3b7f0bec0e chore: cleanup platform specific code 2026-03-30 18:47:47 -04:00
Hojjat
a11b828280 Fix RTL relayout being skipped for single-line text 2026-03-26 17:11:26 -04:00
Ashley Wulber
f59d5354bf increment surface version after sync 2026-03-23 20:16:37 -04:00
Ashley Wulber
9b94ee3ec4 fix: scale 2026-03-23 19:12:21 -04:00