-
Notifications
You must be signed in to change notification settings - Fork 0
lenzu desktop issues
Scope: Main lenzu crate. Prototype-specific findings in
prototypes-desktop-issues.md.
Official GTK3→4 migration guide: https://docs.gtk.org/gtk4/migrating-3to4.html
For a full cross-reference of each issue against the official guide's recommendations,
see prototypes-desktop-issues.md § Official Guide Cross-Reference.
| Crate | Version | Upgradable to |
|---|---|---|
gtk |
0.18.2 |
0.18.2 is final — UNMAINTAINED |
gdk |
0.18.2 |
0.18.2 is final — UNMAINTAINED |
gdk-pixbuf |
0.18.5 |
0.22.0 |
cairo-rs |
0.18.5 |
0.22.0 |
pango |
0.18.3 |
0.22.6 |
pangocairo |
0.18.0 |
0.22.0 |
glib |
0.22.7 |
Already latest |
Key skew: glib is at 0.22 while all six tightly-coupled crates remain at 0.18.
Cargo.lock carries two versions of glib: 0.18.5 (transitive from gtk/gdk/cairo/pango)
and 0.22.7 (direct dependency).
The gtk-rs project abandoned GTK3 bindings at 0.18.x and directed users to
gtk4 for GTK4. Verified:
-
cargo info gtk→gtk 0.18.2marked "UNMAINTAINED Rust bindings for the GTK+ 3 library (use gtk4 instead)" -
cargo info gdk→ same: "UNMAINTAINED Rust bindings for the GDK 3 library (use gdk4 instead)" - No
gtk3crate exists on crates.io (404) - Supporting crates (
cairo-rs,pango,pangocairo,gdk-pixbuf) DO have 0.22.x versions, but they cannot be bumped independently ofgtk/gdkwithout type mismatches (as documented in.github/dependabot.yml)
From .github/dependabot.yml:
"These gtk-rs-core crates are tightly coupled to gtk/gdk 0.18. Bumping them independently causes type mismatches"
The six: gdk-pixbuf, cairo-rs, pango, pangocairo, gdk, gtk
Since gtk and gdk have no 0.22 release, upgrading the supporting crates alone
is impossible without breaking the build.
Consolidated into GTK-Migrations.md — all workaround tables,
guide cross-references, and migration decisions for the prototype workspace now live
there. See the following sections:
| Topic |
GTK-Migrations.md section |
|---|---|
| Full workaround table (22 rows) | § Full Workaround Table |
| Official guide cross-reference | § Guide Cross-Reference |
| Key combo architecture | § Key Combo Architecture |
| Summary: GTK3 vs GTK4 per invariant | § Summary Table |
| Architectural decisions timeline | § Architectural Decisions |
| Workspace dependency graph | § Workspace Dependency Graph |
A test crate is on the feat/gtk4-upgrade-test branch at
prototypes/x11-gtk-lens-test for prototyping the main lenzu crate's migration. (was gtk4-lens-test — renamed)
Consolidated into GTK-Migrations.md — see § Main Crate Migration
Surface Area for the full GTK3→GTK4 mapping table.
Only one file uses the GTK family: lenzu/src/main.rs (~180 of 1536 lines).
All other 14 Rust source files are unaffected.
Prototyped in prototypes/winit-test. Would eliminate all GTK
dependencies but requires implementing window management, transparency, cursor
tracking, and rendering from scratch.
---## 5. Architectural Decisions (from lenzu-prototypes docs)
GTK4 migration is now complete. See
GTK-Migrations.mdfor the full migration reference and workaround table.Decision: GTK4 (
gtk4-rs0.11) — migration completed successfully. The prototype workspace (lenzu-prototypes) validated the approach before porting the main crate.—
docs/planning.md
"A transparent full-screen GTK3 window with drawn rectangles would be the most interactive option but carries the same alpha-compositing / ghosting risk that caused the Tauri->Electron migration."
—
docs/technical-design.phase4-predetect.md
Older Electron (36–41) left ghost pixels with xfwm4 compositing. Updating to Electron 42+ resolves it.
Between hide() and X11 GetImage, ~33-50ms pause needed for compositor to
repaint desktop. Implemented as 200-400ms sleep in main.rs.
Dropped due to alpha compositing artifacts on X11. Migrated to Electron, which produces clean transparency. Thin white titlebar strip remains on some compositors.
gtk-rs 0.18 → 0.22 for GTK3 is impossible — there is no 0.22 GTK3 binding.
The options are:
| Option | Effort | Risk | Notes |
|---|---|---|---|
| Stay on 0.18 | None | Low | Works today; dual glib in lockfile is cosmetic |
| Migrate to GTK4 | High | Medium | Prototypes succeeded; test crate on feat/gtk4-upgrade-test
|
| Replace GTK with winit | Very high | High | Prototyped but bare-bones; full window stack needed |
No — not along the gtk-rs version line. gtk 0.18.2 is the terminal release.
GTK4 migration is now proven possible (prototypes workspace), with a test crate
on the feat/gtk4-upgrade-test branch to port the main lenzu crate.
See also: planning, technical-design.phase4-predetect
CodeMonkeyNinja/lenzu · MIT
- technical-design
- technical-design.lens-window
- GTK-Migrations
- technical-design.OCR
- technical-design.manga-ocr
- technical-design.sarashina
- technical-design.phase4-predetect
- technical-design.cancel-inflight