diff --git a/Cargo.lock b/Cargo.lock index 6375eee29f..260bbea0c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3526,6 +3526,7 @@ dependencies = [ "rfd", "ron", "serde_json", + "winit", "winresource", "winsafe", "x11rb", diff --git a/apps/photocraft/Cargo.toml b/apps/photocraft/Cargo.toml index ed0d683d1d..73d4fe3258 100644 --- a/apps/photocraft/Cargo.toml +++ b/apps/photocraft/Cargo.toml @@ -59,6 +59,9 @@ muda = { version = "=0.21.1", default-features = false } # Drop position on X11 (`cursor.rs`): pure-Rust X client, already in Cargo.lock; pinned exactly. [target.'cfg(target_os = "linux")'.dependencies] x11rb = { version = "=0.13.2", default-features = false } +# Open the window through Xwayland for a pen on Wayland (`tablet.rs`, #639): eframe doesn't +# re-export winit's `EventLoopBuilderExtX11`. Already in Cargo.lock (eframe); pinned exactly. +winit = { version = "=0.30.13", default-features = false, features = ["x11"] } # Drop position on Windows (`cursor.rs`): safe Win32 wrappers (GetCursorPos), no dependencies of # its own. Pinned exactly: review the diff before bumping. diff --git a/apps/photocraft/src/linux_libs.rs b/apps/photocraft/src/linux_libs.rs index 3cdf2fdef1..a5b674dc8c 100644 --- a/apps/photocraft/src/linux_libs.rs +++ b/apps/photocraft/src/linux_libs.rs @@ -13,7 +13,7 @@ //! warn and start anyway. `PHOTOCRAFT_SKIP_LIB_CHECK=1` skips the check. //! //! The parsing and decision logic is pure and tested on every platform; only [`preflight`] -//! touches the system, and it is only called on Linux. +//! and [`available`] touch the system, and they are only called on Linux. #![cfg_attr(not(target_os = "linux"), allow(dead_code))] use std::path::{Path, PathBuf}; @@ -257,18 +257,28 @@ fn read_ldconfig() -> Option { None } -/// Run the check against this system. `Err` carries the message to print before exiting with a -/// non-zero status; a warning is printed here and the app starts. -pub fn preflight() -> Result<(), String> { +/// This system's linker cache and library directories. +fn system_probe() -> Probe { + Probe { ldconfig: read_ldconfig(), dirs: search_dirs(std::env::var("LD_LIBRARY_PATH").ok().as_deref()) } +} + +/// Are all the libraries `session` needs found on this system? (For choosing a display server: +/// libraries the check can't find count as missing.) +pub fn available(session: DisplaySession) -> bool { + check(session, &system_probe(), |p| p.exists()) == Verdict::Ok +} + +/// Run the check for the display server the window opens on against this system. `Err` carries +/// the message to print before exiting with a non-zero status; a warning is printed here and the +/// app starts. +pub fn preflight(session: DisplaySession) -> Result<(), String> { if std::env::var_os("PHOTOCRAFT_SKIP_LIB_CHECK").is_some_and(|v| !v.is_empty() && v != "0") { return Ok(()); } - let session = session_from_env(|k| std::env::var(k).ok()); if session == DisplaySession::None { return Ok(()); } - let probe = Probe { ldconfig: read_ldconfig(), dirs: search_dirs(std::env::var("LD_LIBRARY_PATH").ok().as_deref()) }; - match check(session, &probe, |p| p.exists()) { + match check(session, &system_probe(), |p| p.exists()) { Verdict::Ok => Ok(()), Verdict::Missing { missing, conclusive } => { let distro = std::fs::read_to_string("/etc/os-release").map(|t| distro_from_os_release(&t)).unwrap_or(Distro::Unknown); diff --git a/apps/photocraft/src/main.rs b/apps/photocraft/src/main.rs index 37a3533fb7..83b1f932e8 100644 --- a/apps/photocraft/src/main.rs +++ b/apps/photocraft/src/main.rs @@ -204,10 +204,15 @@ fn main() -> eframe::Result { } } + // The display server to open the window on: Xwayland for a pen on Wayland, which gives this + // app no pen input (#639). + #[cfg(target_os = "linux")] + let session = tablet::display_session(); + // winit and wgpu dlopen the windowing and GPU libraries, and some of those crates panic when // one is missing (issue #201). Name the package to install and exit instead. #[cfg(target_os = "linux")] - if let Err(message) = linux_libs::preflight() { + if let Err(message) = linux_libs::preflight(session) { eprint!("{message}"); std::process::exit(1); } @@ -246,12 +251,12 @@ fn main() -> eframe::Result { #[cfg(target_os = "macos")] let apple_events = &apple_events; - // Pen tablet samples on macOS (AppKit event monitor, before winit sees each event) and X11 - // (started once eframe says which display server it is on). The monitor lives until the event - // loop returns. - let stylus_feed = photocraft_ui_egui::stylus::StylusFeed::default(); + // The macOS pen tablet monitor (installed once eframe created the app, see below); it lives + // until the event loop returns. #[cfg(target_os = "macos")] - let _tablet = tablet::install_macos(&stylus_feed); + let tablet_monitor = std::cell::OnceCell::new(); + #[cfg(target_os = "macos")] + let tablet_monitor = &tablet_monitor; // Read the displays' ICC profiles while the window opens (colour-managed canvas; `None` // where the platform has no reader). @@ -260,6 +265,14 @@ fn main() -> eframe::Result { let presets = services::presets_dir().map(photocraft_engine::preset_store::open_dir_async); let custom_titlebar = custom_titlebar(services::prefs_file().as_deref()); let mut options = native_options(custom_titlebar); + // winit picks Wayland whenever `WAYLAND_DISPLAY` is set; open on X11 when that was chosen. + #[cfg(target_os = "linux")] + if session == linux_libs::DisplaySession::X11 { + use winit::platform::x11::EventLoopBuilderExtX11 as _; + options.event_loop_builder = Some(Box::new(|builder| { + builder.with_x11(); + })); + } // eframe restores the saved window layout before our code runs; drop values that would crash it. ui_state::sanitize(options.persistence_path.as_deref()); // Crash-safe GPU startup (#4): pick the backend (a marker left by a start that died in the @@ -408,9 +421,13 @@ fn main() -> eframe::Result { let _ = in_window_menus; // Where file drags and drops are (winit 0.30 doesn't say). app.services.cursor_pos = cursor::service(cc); - // Tablet pressure/tilt/eraser (winit drops them): the macOS monitor installed above - // and the X11 reader write into this feed. - app.stylus.feed = stylus_feed; + // Tablet pressure/tilt/eraser (winit drops them): the macOS monitor and the X11 reader + // write into the stylus feed. The monitor goes in here, not before the event loop: + // AppKit's shared application only exists once winit created it (#759). + #[cfg(target_os = "macos")] + if let Some(monitor) = tablet::install_macos(&app.stylus.feed) { + let _ = tablet_monitor.set(monitor); + } #[cfg(target_os = "linux")] tablet::spawn_x11(&app.stylus.feed, display); // Paths on the command line (Linux/Windows file associations, `photocraft a.psd`). diff --git a/apps/photocraft/src/tablet.rs b/apps/photocraft/src/tablet.rs index 9b4c9cddbb..75c1388f94 100644 --- a/apps/photocraft/src/tablet.rs +++ b/apps/photocraft/src/tablet.rs @@ -4,8 +4,17 @@ //! local event monitor; XInput2 raw events on a second X connection) and this module writes each //! sample into the UI's [`StylusFeed`], where the canvas reads it exactly like the web runner's //! Pointer Events and automation's simulated pen. Windows needs nothing here: winit forwards -//! `WM_POINTER` pressure as touch force. Wayland has no tablet input yet (see the crate docs). +//! `WM_POINTER` pressure as touch force. +//! +//! Wayland compositors give a pen only to clients that bind the tablet protocol +//! (`zwp_tablet_v2`), which winit 0.30 doesn't (and binding it on winit's connection needs +//! `unsafe`, see the crate docs): there the pen does nothing in the window, not even move the +//! pointer (#639). Xwayland binds it and serves the pen as an XInput2 device, so with a pen +//! attached the app opens its window through Xwayland ([`display_session`]), where the X11 reader +//! gets pressure, tilt and the eraser end. +#[cfg(any(target_os = "linux", test))] +use crate::linux_libs::DisplaySession; use photocraft_tablet::Sample; use photocraft_ui_egui::stylus::{PenSample, StylusFeed}; @@ -19,20 +28,60 @@ pub fn sink(feed: StylusFeed) -> impl Fn(Option) + Send + 'static { move |s| feed.set(s.map(pen_sample)) } -/// Install the AppKit tablet monitor (main thread, before the event loop). Keep the result until -/// the event loop returns. On failure this logs why: pens then paint like a mouse. +/// Install the AppKit tablet monitor (main thread, once winit created the shared application: +/// from eframe's app creation, not before the event loop). Keep the result until the event loop +/// returns. On failure this logs why: pens then paint like a mouse. #[cfg(target_os = "macos")] pub fn install_macos(feed: &StylusFeed) -> Option { photocraft_tablet::macos::Monitor::install(sink(feed.clone())).map_err(|e| log::warn!("{e}")).ok() } -/// Start the XInput2 reader when eframe runs on X11. On Wayland, `$DISPLAY` is Xwayland, which -/// sees none of this window's input (and a pen sample from another X app would outlive a mouse -/// stroke here), so nothing starts. +/// The display server to open the window on: the session's own, except Xwayland on Wayland when +/// a pen is attached (see the module docs) and Xwayland can run the window: `$DISPLAY` is set +/// and the X11 libraries are installed. `PHOTOCRAFT_NATIVE_WAYLAND=1` keeps native Wayland. +#[cfg(target_os = "linux")] +pub fn display_session() -> DisplaySession { + let var = |k: &str| std::env::var(k).ok(); + let session = crate::linux_libs::session_from_env(var); + let pen = || std::fs::read_to_string("/proc/bus/input/devices").is_ok_and(|d| has_pen(&d)); + let x11_libs = || crate::linux_libs::available(DisplaySession::X11); + if pen_needs_xwayland(session, var, pen, x11_libs) { + eprintln!("photocraft: pen found; opening the window through Xwayland, where the pen works (PHOTOCRAFT_NATIVE_WAYLAND=1 keeps Wayland)"); + return DisplaySession::X11; + } + session +} + +/// [`display_session`]'s decision; the system probes run only when the session asks for them. +#[cfg(any(target_os = "linux", test))] +pub fn pen_needs_xwayland(session: DisplaySession, var: impl Fn(&str) -> Option, pen: impl FnOnce() -> bool, x11_libs: impl FnOnce() -> bool) -> bool { + let set = |k: &str| var(k).is_some_and(|v| !v.is_empty() && v != "0"); + session == DisplaySession::Wayland && !set("PHOTOCRAFT_NATIVE_WAYLAND") && set("DISPLAY") && pen() && x11_libs() +} + +/// `BTN_TOOL_PEN` (linux/input-event-codes.h): the key a pen tablet's stylus, a pen display's or +/// a pen-enabled touchscreen's reports (libinput treats such a device as a tablet tool). +#[cfg(any(target_os = "linux", test))] +const BTN_TOOL_PEN: u32 = 0x140; + +/// Is a pen among the input devices `/proc/bus/input/devices` lists? Each device's `B: KEY=` line +/// is its key bitmap as hex words of the kernel's `long`, most significant first. +#[cfg(any(target_os = "linux", test))] +pub fn has_pen(devices: &str) -> bool { + let bits = usize::BITS; + let word = usize::try_from(BTN_TOOL_PEN / bits).unwrap_or(usize::MAX); + devices.lines().filter_map(|l| l.strip_prefix("B: KEY=")).any(|keys| { + keys.split_whitespace().rev().nth(word).and_then(|w| u64::from_str_radix(w, 16).ok()).is_some_and(|w| (w >> (BTN_TOOL_PEN % bits)) & 1 == 1) + }) +} + +/// Start the XInput2 reader when eframe runs on X11 (Xwayland included). On native Wayland, +/// `$DISPLAY` is Xwayland, which sees none of this window's input (and a pen sample from another +/// X app would outlive a mouse stroke here), so nothing starts. #[cfg(target_os = "linux")] pub fn spawn_x11(feed: &StylusFeed, display: Option) { if display != Some(DisplayKind::X11) { - log::info!("tablet pressure: not available on this display server ({display:?}); Wayland is a follow-up to #79"); + log::info!("tablet pressure: not available on this display server ({display:?})"); return; } if let Err(e) = photocraft_tablet::x11::spawn(None, sink(feed.clone())) { @@ -161,6 +210,57 @@ mod tests { assert!(heavy_dark > light_dark + 0.3, "opacity responds: {light_dark} → {heavy_dark}"); } + /// `/proc/bus/input/devices` of a laptop with a Wacom Intuos Pro attached (64-bit longs: the + /// pen's `KEY=1c03 0 0 0 0 0` has bit 0x140, BTN_TOOL_PEN) and of the same laptop without it. + const WITH_PEN: &str = "I: Bus=0011 Vendor=0001 Product=0001 Version=ab83\n\ + N: Name=\"AT Translated Set 2 keyboard\"\n\ + H: Handlers=sysrq kbd event3 leds\n\ + B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe\n\ + \n\ + I: Bus=0018 Vendor=06cb Product=ce26 Version=0100\n\ + N: Name=\"SYNA2B33:00 06CB:CE26 Touchpad\"\n\ + H: Handlers=mouse1 event7\n\ + B: KEY=e520 10000 0 0 0 0\n\ + B: ABS=2e0800000000003\n\ + \n\ + I: Bus=0003 Vendor=056a Product=0357 Version=0110\n\ + N: Name=\"Wacom Intuos Pro M Pen\"\n\ + H: Handlers=mouse2 event10\n\ + B: KEY=1c03 0 0 0 0 0\n\ + B: ABS=1000f000003\n"; + + #[test] + fn a_pen_is_found_by_its_btn_tool_pen_key() { + assert!(has_pen(WITH_PEN)); + let without = WITH_PEN.split("\n\n").take(2).collect::>().join("\n\n"); + assert!(!has_pen(&without), "a touchpad's BTN_TOOL_FINGER (0x145) is not a pen"); + // Short or malformed bitmaps are no pen, never a panic. + for keys in ["", "B: KEY=", "B: KEY=1", "B: KEY=zz 0 0 0 0 0", "B: KEY=ffffffffffffffffff 0 0 0 0 0", "B: KEY=0 0 0 0 0 0 0 0"] { + assert!(!has_pen(keys), "{keys:?}"); + } + } + + #[test] + fn a_pen_on_wayland_opens_the_window_through_xwayland() { + use std::collections::HashMap; + let env = |pairs: &[(&str, &str)]| { + let m: HashMap = pairs.iter().map(|(k, v)| (k.to_string(), v.to_string())).collect(); + move |k: &str| m.get(k).cloned() + }; + let wayland = [("WAYLAND_DISPLAY", "wayland-0"), ("DISPLAY", ":0")]; + assert!(pen_needs_xwayland(DisplaySession::Wayland, env(&wayland), || true, || true)); + // No pen, no Xwayland, no X11 libraries, or the user keeps Wayland: native Wayland. + assert!(!pen_needs_xwayland(DisplaySession::Wayland, env(&wayland), || false, || true)); + assert!(!pen_needs_xwayland(DisplaySession::Wayland, env(&[("WAYLAND_DISPLAY", "wayland-0")]), || true, || true)); + assert!(!pen_needs_xwayland(DisplaySession::Wayland, env(&wayland), || true, || false)); + let native = [("WAYLAND_DISPLAY", "wayland-0"), ("DISPLAY", ":0"), ("PHOTOCRAFT_NATIVE_WAYLAND", "1")]; + assert!(!pen_needs_xwayland(DisplaySession::Wayland, env(&native), || true, || true)); + let zero = [("WAYLAND_DISPLAY", "wayland-0"), ("DISPLAY", ":0"), ("PHOTOCRAFT_NATIVE_WAYLAND", "0")]; + assert!(pen_needs_xwayland(DisplaySession::Wayland, env(&zero), || true, || true)); + // X11 already gets the pen; the probes don't even run off Wayland. + assert!(!pen_needs_xwayland(DisplaySession::X11, env(&[("DISPLAY", ":0")]), || panic!("probed"), || panic!("probed"))); + } + #[test] fn use_tablet_pressure_off_paints_like_a_mouse() { let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), Default::default()); diff --git a/crates/tablet/src/appkit.rs b/crates/tablet/src/appkit.rs index 1748a25bbd..2d00c093ca 100644 --- a/crates/tablet/src/appkit.rs +++ b/crates/tablet/src/appkit.rs @@ -3,7 +3,9 @@ //! //! - Mouse down/up/dragged/moved events whose `subtype` is `NSEventSubtypeTabletPoint` come from //! a pen: `pressure` (0..1), `tilt` (-1..1 per axis) and `rotation` (degrees) are valid. -//! A mouse event with any other subtype is a mouse or trackpad: back to `None`. +//! A mouse event with any other subtype is a mouse or trackpad: back to `None`. The pen's +//! button-up reports pressure 0 and keeps the sample instead: it reaches the UI in the same +//! frame as the stroke's last moves, which must keep the pressure they were drawn with. //! - `NSEventTypeTabletPoint` events carry the same fields without a mouse event. //! - `NSEventTypeTabletProximity` events (and mouse events with the proximity subtype) say a //! tool entered or left proximity and which one (`pointingDeviceType`: pen, eraser, cursor). @@ -113,6 +115,10 @@ impl State { return self.proximity(e); } if e.kind == TABLET_POINT || (mouse && e.subtype == subtype::TABLET_POINT) { + // Lifting the tip reports pressure 0 (the next hover move says so too). + if matches!(e.kind, LEFT_MOUSE_UP | RIGHT_MOUSE_UP | OTHER_MOUSE_UP) { + return Update::Keep; + } return Update::Set(Some(self.sample(e))); } if mouse { Update::Set(None) } else { Update::Keep } @@ -171,6 +177,23 @@ mod tests { assert_eq!((s.pressure, s.tilt_x, s.tilt_y), (0.8, -60.0, -60.0)); } + /// The UI paints a frame's moves at the sample current when it runs, after AppKit dispatched + /// all of the frame's events: a lift's pressure 0 must not thin the stroke's last moves. + #[test] + fn lifting_the_pen_keeps_the_strokes_pressure() { + let mut st = State::default(); + assert!(set(st.handle(&pen(event_type::LEFT_MOUSE_DRAGGED, 0.7, (0.0, 0.0), 0.0))).is_some()); + for kind in [event_type::LEFT_MOUSE_UP, event_type::RIGHT_MOUSE_UP, event_type::OTHER_MOUSE_UP] { + assert_eq!(st.handle(&pen(kind, 0.0, (0.0, 0.0), 0.0)), Update::Keep, "type {kind}"); + } + // Hovering afterwards reports the pen with no pressure. + let s = set(st.handle(&pen(event_type::MOUSE_MOVED, 0.0, (0.0, 0.0), 0.0))).unwrap(); + assert_eq!(s.pressure, 0.0); + // A mouse's button-up is still a mouse. + let e = RawEvent { kind: event_type::LEFT_MOUSE_UP, subtype: subtype::MOUSE, ..Default::default() }; + assert_eq!(st.handle(&e), Update::Set(None)); + } + #[test] fn mouse_events_are_full_pressure_mice() { let mut st = State::default(); diff --git a/crates/tablet/src/lib.rs b/crates/tablet/src/lib.rs index 2b1c4555df..16214be149 100644 --- a/crates/tablet/src/lib.rs +++ b/crates/tablet/src/lib.rs @@ -14,7 +14,9 @@ //! - **Wayland**: not covered. The `zwp_tablet_v2` protocol has to be bound on winit's own //! `wl_display` connection (the tablet events name winit's `wl_surface`), which needs //! `unsafe` foreign-display interop, and binding it makes compositors stop emulating the -//! pointer for the pen, so pen motion would have to be re-injected into egui as well. +//! pointer for the pen, so pen motion would have to be re-injected into egui as well. Without +//! it, compositors give the window no pen input at all, so the desktop app opens its window +//! through Xwayland when a pen is attached, and the X11 reader applies. //! //! The platform glue only reads raw values and hands them to the pure mapping in [`appkit`] and //! [`xi`], which normalise, clamp and track pen state and are tested on every platform. diff --git a/crates/ui-egui/src/stylus.rs b/crates/ui-egui/src/stylus.rs index 6be50d7ec6..64d63246e5 100644 --- a/crates/ui-egui/src/stylus.rs +++ b/crates/ui-egui/src/stylus.rs @@ -15,9 +15,10 @@ //! the eraser end into the [`StylusFeed`] before winit handles each event. //! - **Linux X11**: the desktop app reads XInput2 raw valuator events on its own X connection //! (`photocraft-tablet`, x11rb) and writes them into the [`StylusFeed`]. -//! - **Linux Wayland**: no tablet input yet (`zwp_tablet_v2` would have to share winit's -//! connection); pressure is 1. Launching with `WAYLAND_DISPLAY=` runs the app under Xwayland, -//! which reports tablet valuators. +//! - **Linux Wayland**: compositors give a pen only to clients that bind `zwp_tablet_v2`, which +//! winit doesn't (it would have to share winit's connection), so with a pen attached the +//! desktop app opens its window through Xwayland, which reports tablet valuators to the X11 +//! reader. `PHOTOCRAFT_NATIVE_WAYLAND=1` keeps native Wayland, where the pen has no input. //! //! Preferences › Tools › Use Tablet Pressure off makes a pen paint like a mouse. Flipping the pen //! to its eraser end selects the Eraser tool and flipping back restores the previous tool, as in diff --git a/docs/development.md b/docs/development.md index 2a87fba3f9..3c7303310d 100644 --- a/docs/development.md +++ b/docs/development.md @@ -68,6 +68,7 @@ By default PhotoCraft's own crates log at `info` and everything else at `warn`. | `PHOTOCRAFT_AUTOMATION_READ_ROOT` | Directory capability for automation reads; requests use relative paths | | `PHOTOCRAFT_AUTOMATION_WRITE_ROOT` | Separate directory capability for automation writes; requests use relative paths | | `PHOTOCRAFT_CPU_CANVAS=1` | Force the CPU canvas path instead of the wgpu shader canvas | +| `PHOTOCRAFT_NATIVE_WAYLAND=1` | Linux: stay on native Wayland when a pen is attached (by default the window then opens through Xwayland, because Wayland gives the app no pen input; #639) | | `WGPU_BACKEND=dx12` | Pick the wgpu backend(s) (`vulkan`, `dx12`, `metal`, `gl`); overrides `performance.gpuBackend` and the startup fallback | | `WGPU_DX12_COMPILER=fxc` | DX12 shader compiler (`fxc`, `dxc`, `auto`); `dxc` and `auto` look `dxcompiler.dll` up through the DLL search path | | `PHOTOCRAFT_GPU_TILE=2048` | Force GPU canvas tiling (tests tile seams) | diff --git a/docs/roadmap.md b/docs/roadmap.md index 7612fd013e..7b1d8f73d9 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -18,7 +18,7 @@ readiness; treat it as an upper bound. | M3 Viewer app | ✅ | egui shell (Pro / Studio / Classic themes), 13+ codecs, native and web (trunk) builds | | M4 Native format + engine | ✅ | 500+ commands, `.pcraft` (incremental, autosave, crash recovery), CLI, persistent preferences | | M5 GPU compositor | 🟡 | wgpu compositor drives the canvas, layer effects, vector masks, artboards, pattern fills and every clip case included (≤1/255 vs CPU); Multichannel documents fall back to the CPU | -| M6 Paint + select | 🟡 | brush engine, all selection tools, multi-layer selection, snapping + smart guides, free transform + warp; stylus pressure on Windows (WM_POINTER via winit), the web (Pointer Events, with tilt/twist), macOS (AppKit event monitor: pressure, tilt, rotation, eraser end) and Linux X11 (XInput2 raw valuators); Linux Wayland (tablet-v2) still open (#79) | +| M6 Paint + select | 🟡 | brush engine, all selection tools, multi-layer selection, snapping + smart guides, free transform + warp; stylus pressure on Windows (WM_POINTER via winit), the web (Pointer Events, with tilt/twist), macOS (AppKit event monitor: pressure, tilt, rotation, eraser end) and Linux X11 (XInput2 raw valuators); on Linux Wayland a pen opens the window through Xwayland (native tablet-v2 still open, #79) | | M7 Adjust + filters | 🟡 | 16 adjustment layers + destructive-only adjustments, 70+ filters incl. Blur Gallery, Actions record/replay, Fade | | M8 PSD v2 | 🟡 | adjustments (incl. Selective Color, Color Lookup), fills, effects, patterns, text, shapes, smart objects, alpha channels; oracle 111/170 | | M9 Text, vector, styles | 🟡 | type engine + Warp Text, shapes / pen / paths, all 10 effects on CPU and GPU (parity ≤1/255, 30/31 corpus effect files on the GPU) | @@ -71,7 +71,7 @@ Confidence: moderate — the next users of 0.2.x will move these numbers either | Core editing (layers, masks, selections, adjustments, filters, transforms) | Broad engine coverage; many interaction bugs fixed after 0.2.0 (adjustment dialogs, Curves, crop, Move/Transform modifiers, gesture origin) | medium | Fixes not yet user-validated. | | UI / UX polish | Shortcut audit 214 → 0 failures; dock, Layers rows and menus reworked; first visual-QA sweep found 14 defects (#147–#157). 2026-10-07: the keyboard-only shortcuts with no menu item (⌥[ ⌥] ⌥, ⌥. layer navigation, ⇧⌥[ ⇧⌥] to extend the selection, 1–0 for opacity and ⇧ for flow or fill, ⇧[ ⇧] hardness, ⌥⌘T to transform a copy and ⌥⇧⌘T to step and repeat), ⌥-click colour sampling with painting tools, double-click a Layers row for Layer Style, File › New from Clipboard, a centred main window and remembered Liquify settings (#352, #417, #350, #368, #419, #418) | low–medium | Needs recurring visual QA with realistic documents. | | Tools | 2026-10-08: Pencil, Mixer Brush, Patch, Content-Aware Move and Vertical Type are toolbar tools. Remaining missing tools include Red Eye, Pattern Stamp, Art History Brush, Freeform/Curvature Pen, Add/Delete Anchor Point tools, single row/column marquee, Color Sampler, Perspective Crop, Rotate View, type masks and Frame | low–medium | Patch has a live healing preview. Content-Aware Move is partial: Move/Extend, Structure/Color and Sample All Layers exist; Transform On Drop and a live result preview remain missing (`TOOL-213-4` in the scorecard). Magic/Background Eraser added; live gradients in progress (#180). Magnetic Lasso added 2026-10-08 (live-wire edge tracing, Width/Contrast/Frequency, `select.magneticLasso`). | -| Painting | Brush model and Brush Settings panel near Photoshop; .abr/.grd import; persistent presets; pen pressure/tilt on Windows, web, macOS and X11 | medium | Wayland pen input open (#79); macOS/X11 pressure not yet verified on tablet hardware. | +| Painting | Brush model and Brush Settings panel near Photoshop; .abr/.grd import; persistent presets; pen pressure/tilt on Windows, web, macOS and X11 | medium | Native Wayland pen input open (#79; a pen opens the window through Xwayland meanwhile); X11 pressure confirmed by a user, macOS not yet verified on tablet hardware. | | Text / typography | Engine works; caret placement and size editing fixed; OpenType features, text-on-path editing, composer parity partial | medium-low | Measure with the Photoshop-authored set. | | Colour management | Colour-managed canvas (document → monitor), embedded CMYK profiles, linear EXR/HDR, 16-bit float canvas | medium-high | Monitor profile follows only at launch. | | Performance | 14k+ px on the GPU at ~⅓ the memory; adjustment preview 285 ms → 4–9 ms; font-size edits 297 ms → 4.6 ms; 2026-10-07: 30 MP TIFF open (banded, parallel strip/tile decode) Deflate 345 → 32 ms, LZW 428 → 43 ms, BigTIFF and every IFD readable | medium-high on rasters | Complex layout documents still laggy (#125/#128); >16384 px GPU tiling in progress (#49). |