Skip to content

Fix the native items from the review - #893

Merged
SimonCropp merged 5 commits into
mainfrom
fix-native
Sep 23, 2026
Merged

SimonCropp merged 5 commits into
mainfrom
fix-native

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Sep 23, 2026

Copy link
Copy Markdown
Member

This fixes the "Native" group from todo.md, apart from App Nap, which needs a Mac to check. The binaries are rebuilt by build-native (#892, fast-forwarded into this branch).

Item Fix Tests
Decoded image caches never evict on Linux or macOS Linux marks each picture a frame asks for and drops the rest after rendering (ForgetUnusedPictures). macOS keeps only the paths the frame names None; the cache is not visible from outside
macOS drag-select clamps to capacity rather than the rows drawn draggedRow clamps to the pane's rows, as Linux's RowAt does Needs a Mac
The Linux queue header ignores pendingCount Pending (N)###Pending, so the column id does not change with the count The six Linux pixel baselines with a queue, re-approved; the header is the only change in each
deview_capture flips scissors with the window height drawData->DisplaySize.y Latent; captures are the window's size
Five-digit line numbers widen the Linux gutter One digit count for every row of a frame (GutterDigits, at least four), so the text start read from the first row holds for all Output is unchanged below line 10000
No autorelease pool around the hand-pumped frame Every export's body runs in autoreleasepool Needs a Mac
Dock Quit and logout skip PersistOwned An app delegate records a close and returns .terminateCancel; the managed loop exits and persists as it does for the close button Needs a Mac
NativeResolver loads the glibc build on musl A musl RID probes itself and nothing else, as BundledViewerDirectory.Rids does NativeTests.MuslProbesItsOwnRidAndNothingElse, OtherRidsStillFallBackToTheSynthesisedRid

The Linux pixel tests compare at SSIM 0.999, which the header's extra characters stay above, so the old baselines still passed. They were recaptured on CI rather than left describing the old header. The other four came back byte-identical, so the gutter and scissor changes leave ordinary output alone.

This also fixes the windows job, red on main since #890. FormsHeadTests.CanvasHost docked its canvas to a form, and a top-level window is held to the screen's size: on the 1024×768 agent every canvas came out 1028×749, so HighlightAtColumn66CoversItsGlyph drew no column 66 and WhatTheFirstWindowHoldsAtEachScale measured a 200% window at 1028 wide. The canvas is now sized itself, as a child control that no screen limits.

A refused quit also cancels a logout that asked for it, as with GLFW apps; the viewer has exited by the time the logout is tried again.

The full solution passes locally in Release: 2,090 passed, 22 skipped.

SimonCropp and others added 5 commits September 23, 2026 15:30
- Both native renderers drop decoded pictures the frame just drawn did not
  use. An entry used to go only when its own path was asked for again and had
  changed, so every image reviewed in a session stayed decoded until it ended.
- A macOS drag clamps to the rows the pane drew, as Linux's RowAt does, rather
  than to the body's capacity. A drag past the end reached rows the managed
  side holds back, so the status line counted, and a copy took, rows nobody
  saw highlighted.
- The Linux queue header says "Pending (N)", as every other renderer does.
- RenderDrawData flips scissor rectangles with the draw data's height rather
  than the window's, which a capture's render texture need not share.
- The Linux gutter takes one width for every row of a frame, wide enough for
  the longest line number drawn. Formatted per row, a five digit number moved
  its own row's text a cell right of the rows above, where the hit test did not
  look.
- Every macOS export runs in an autorelease pool. With no NSApplication.run to
  drain one per event, everything a frame autoreleased stayed until the
  process exited.
- An app delegate turns a Dock Quit or logout into a close, which the managed
  loop answers by persisting an owned queue and exiting. terminate: exited from
  inside the pump, so that cleanup never ran.
- NativeResolver probes a musl RID and nothing else, as BundledViewerDirectory
  does. The linux-{arch} candidate after it names the glibc build.
A top level window is held to the screen's size. The windows build agent's
screen is 1024 by 768, so every canvas CanvasHost docked came out 1028 by 749
whatever was asked for: HighlightAtColumn66CoversItsGlyph drew no column 66,
and WhatTheFirstWindowHoldsAtEachScale measured a 200% window at 1028 wide.
Both have failed the windows job on main since #890. A child control has no
such limit.
@SimonCropp SimonCropp added this to the 20.5.0 milestone Sep 23, 2026
@SimonCropp
SimonCropp merged commit 5b9e489 into main Sep 23, 2026
14 checks passed
@SimonCropp
SimonCropp deleted the fix-native branch September 23, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant