Repository navigation
Tests: render in windows that are on no display - #513
Merged
Merged
Conversation
The render and capture tests hosted their views in titled windows at the origin and ordered them in, so they showed on every screen during swift test. They now use OffscreenWindow: far outside every display, never key, never main, and kept off the screens. A guard test checks it with AppKit and the window server.
hotkakao
pushed a commit
to hotkakao/nxnative-romfs-archive
that referenced
this pull request
Nov 2, 2026
…ied as a merge that keeps its tree PR LNPANDY#115 is the complete version of the sync repair: it drops the fork's NRO patcher because upstream fixed the same bug itself (3e77816c, 7e0f5971, 337186cf - their data_blocks() starts an NRO's code at 0x80 and their test covers both cases the fork's did), reworks the archive handle tag to bit 57 for seedds LNPANDY#513's FH_OUT/FH_IN shift, stops the double ad-hoc signing build_ipa.sh would get now that upstream carries the entitlements itself, follows the new pwd/errno anchor, and makes the daily health check use the real .upstream-ref base (issue LNPANDY#105). A textual merge against main conflicted inside the same GetFileSize hunks both sides had rewritten, so the three files are taken from the PR's branch as they are. Verified here: both patcher suites pass (against seedds main 062cd06e and against the last sync base), and --old 75065df --new seedds/main --skip-build reaches SYNC OK. Co-authored-by: v0lumehi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix or feature
What and why
While I shared my screen in Teams, windows popped up on my external monitor during
swift test. The render and capture tests host SwiftUI views in titled windows at the origin and order them in. A titled window is also moved back onto a screen by AppKit, so even an offscreen frame does not hold for it.This adds one test helper,
OffscreenWindowinfrontend/Tests/NX2AppleTests/OffscreenWindow.swift. It sits at (-100000, -100000), is never key or main, and is put back offscreen after the initializer moved it. It is still ordered in, so layout andcacheDisplaywork as before. The titled style stays the default because the launcher draws under its transparent title bar. EveryNSWindow(contentRect:...)in the tests that is shown now uses it (16 files).setActivationPolicy(.accessory)calls stay. No product code changed.One side effect: the captures of a 1440x1024 window were cut to the height of the screen before (992 pt on my Mac). They are now the full 1024 pt, so the PNGs no longer depend on the display.
Checked
cd frontend && swift test: 703 tests, 17 skipped, 0 failures, and the pre-push hook passed.OffscreenWindowTests.testRenderWindowsAreNeverOnAnyDisplayorders in a titled, a borderless and a resizable helper window and asserts that none is on a display, for AppKit (NSApp.windowsagainstNSScreen.screens) and for the window server (CGWindowListCopyWindowInfo). I also ran the whole suite once with a temporary observer that did the same check after every test. It found no window on a display (537 checks). The observer is not in the PR.NX_LAUNCHER_CAPTURE_DIRcaptures (78 PNGs) and the console captures (24) before and after. Console captures and 47 launcher captures are identical. The others differ only in the random temp path text, or in height as described above.ConsoleTests.testFirstTileRingIsNotClippedAfterScrollingBackpassed in every run.Screenshots
None, no visible change.
Scope
dm/,scripts/,docs/,ref/) is added to the repository