Behaviour-preserving: `[[ ]]` in place of `[ ]` for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses `-a`/`-o`, escaped parentheses or an unquoted pattern on the right of `=`. `bash -n` passes on each script; the rest is left to CI.
- `packaging/linux/apprun-cli-test.sh` (14)
With only Red, Green or Blue targeted the reference application refuses
the stroke ("target channels do not cover the composite"), erases nothing
and adds no History state. The check sits in the setup shared by the
command and its live preview, so the preview draws nothing either. The
composite and the partial sets that weren't measured keep erasing.
The transparency-lock preview test targeted Green alone; it targets
Green and Blue now. Its helpers are pub(super) for the new tests.
main fails the gate at clippy since #12214 landed: its Count arm took
draw_default_tool_cursor to a cognitive complexity of 31 (limit 30).
The Pencil / Block eraser outline moves into pencil_outline_cursor;
behaviour is unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A Classic gradient drag on a hidden layer, a fully locked layer or a group now opens a modal alert
with OK (the texts of the Brush's #11898 alerts, for the gradient tool) and changes nothing, instead
of a status-bar line or a command error that named paint.gradient. The live Gradient and the
unmeasured cases (partly locked layers) keep their behaviour.
* Windows: a pen or a finger moves and resizes the window through the custom title bar (#7967)
winit takes pen and touch input as WM_POINTER messages and Windows makes no mouse
input from them, so the OS move/size loop that StartDrag/BeginResize start saw no
button down and never ran. winit only clears its dragging flag when that loop ends,
so after one pen try the mouse could no longer move the window either. A pen or
touch press on the title bar's gap or an edge now moves or resizes the window
itself (OuterPosition/InnerSize), restores a maximized window under the pen, and
stops at the minimum size; the mouse still hands the move to the OS.
* Pen title-bar move and resize follow the pen's own screen position (#7967)
On Windows winit moves the window asynchronously (SWP_ASYNCWINDOWPOS), so the
window position egui reads can be ahead of the window-relative pen position and
the drag counted the move twice (an injected pen ran +687/+909 for +200/+120).
The tablet hook now keeps the pen's screen pixels from GetPointerPenInfo
(ptPixelLocation) while the pen is down, and a PenDrag follows that.
A drag that follows the OS position no longer needs egui's pointer position: the
parked mouse cursor can leave the window as it moves away, and egui-winit's
PointerGone ended the drag after a few steps. It ends on release or when no
touch is down.
With the Delete Anchor Point tool, Escape with no running operation first clears
anchors selected on the saved path targeted in the Paths panel, then deselects that
path, so its outline and anchors go and a click deletes nothing. It waits while the
path's name is typed in the Paths panel, where Escape cancels the rename. Full screen
and a pixel selection still take Escape first; the Work Path and a layer's path keep
today's Escape.
A Sharpen press on a hidden target layer, a layer with Lock All or
Lock Image Pixels, or with a group active opens the reference
application's modal alert instead of a status-bar message. A tool with
a colour-mode alert now gets it first and falls through to the layer
checks otherwise; the Dodge tool still has no layer alerts.
The Pen's Make Selection dialog (canvas menu, options bar) now has
Photoshop's layout: Rendering with Feather Radius in pixels and
Anti-aliased, then Operation with New / Add to / Subtract from /
Intersect with Selection as radio buttons. The last three are greyed out
without a selection. The fields and params are the same as before.
OK with New Selection names the step it added "Selection Change".
Cmd/Ctrl+Enter, the Paths panel and the combining operations keep
"Make Selection" (not measured).
The options-bar Split buttons stayed armed after the split, so every further
click on the canvas added another line. The release that places a split now
clears split_tool, as in the reference; a release that places none keeps the
mode armed, as today. The existing test now expects the mode to end instead of
staying armed.
A click in these modes opens the reference's alert instead of running, and paint.redEye returns the same text, leaving pixels and History unchanged. The two tests that expected CMYK to run and Grayscale to miss now expect the refusal.
* codecs: check TIFF structural tags, predicted rows and JPEG chunk frames
- Duplicate structural tags: the directory checks read a tag's first
entry and the tiff crate its last, so a small SamplesPerPixel first
and a large one last was admitted with one value and sized with the
other. A repeated structural tag is now refused.
- Floating-point predictor: the tiff crate reads each tile row at its
full stored width into a buffer of its own, outside the scratch cap.
That row (TileWidth x samples x sample size) must now fit the cap.
- JPEG-compressed chunks: the tiff crate decodes each chunk into a
whole JPEG image sized by the embedded frame header, with no limits.
Each chunk's frame (read from the chunk or JPEGTables, at most 256
marker segments in) must now fit the nominal strip or tile, as
libtiff requires, and its decoded size must fit the scratch cap.
* address review: JPEG chunk dedup by count, offset-2 frame, shared fill budget
* address review: bound JPEG chunk list by scratch cap
* address review: reserve JPEG chunk list at the budgeted length