Put the configure sheet back, and document why Options dies - #6
Merged
Merged
Conversation
Reverts the sheet lifetime change. The reasoning behind it does not survive contact with the machine: the second read was never the failure, and neither was holding one controller. Reading the property twice does drop the first window, but hosts read it once per click — traced from inside the installed bundle — so nothing was being dropped in practice. The reuse it replaced that with was no better and no worse. What is left is the shape every screen saver uses, and the one Apple's own guidance shows: build a controller, hand over its window. `isReleasedWhenClosed` stays off. ARC owns the window through the controller, and the default would let a host that closes the sheet rather than ordering it out release it a second time. That is a real if latent bug, and unrelated to any of the above. The Options button dying is a host bug. System Settings on macOS 26 spawns duplicate legacyScreenSaver instances and loses track of them, so the sheet is handed over, attached and ordered in — against a remote view window that is no longer on screen. Traced at the moment of the click, the sheet reports isVisible == true with a live sheetParent while occlusionState never gains .visible: attached to a ghost, never drawn. Switching the screen saver away and back reproduces it every time; a freshly spawned host never shows it. Apple has it as FB19201567, with FB19204084 for the ScreenSaverView instances that pile up alongside. Neither is fixed as of 26.1b3. Nothing in configureSheet chooses the parent window, so there is nothing here to fix — the README now says so, and says to restart the host.
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.
Reverts #5 and documents the actual cause of the Options button doing nothing.
#5 was wrong
Its reasoning does not survive contact with the machine. Tracing the installed
bundle at the moment of the click shows hosts read
configureSheetonce perclick, so the "second read drops the first window" hazard it was built around
was never firing. The reuse it replaced that with was no better and no worse — the
symptom is unchanged either way.
What is left is the shape every screen saver uses, and the one Apple's own
guidance shows: build a controller, hand over its window.
isReleasedWhenClosedstays off. ARC owns the window through the controller, andthe default would let a host that closes the sheet rather than ordering it out
release it a second time. Real, if latent, and unrelated to any of the above.
The Options button is a host bug
Reproduces every time: switch the screen saver away and back, then press Options.
A freshly spawned host never shows it.
Traced from inside the bundle, one second after handing the window over:
8194 = 8192 | 2, and2isNSWindow.OcclusionState.visible. In the failingcase the sheet is attached (
sheetParentis live,isVisible == true) and neverdrawn — and so is the parent it was attached to. The parent differs between the
two: a different remote view window, one left over from before the switch.
Which window the host attaches the sheet to is not something
configureSheetcaninfluence. The saver hands over an identically prepared window in both cases.
System Settings on macOS 26 spawns duplicate
legacyScreenSaverinstances andloses track of them — Apple has it as FB19201567, with FB19204084 for the
ScreenSaverViewinstances that pile up alongside. Neither is fixed as of26.1b3. See
macOS 26 Tahoe Screen Saver issues,
where "Options panel does not open" is reported directly.
The README now carries this as a known issue, with the way out:
killall legacyScreenSaver, then quit and reopen System Settings.Not done
A workaround is possible — wait for the host to have its go, and if
occlusionStatestill lacks.visible, take the window back and put it upourselves. It orders a window front from a process that is not the active
application, so it is not dependable, and it papers over a system bug in every
user's install to fix a case a restart already fixes. Left out.
Verified
Both schemes build and analyse;
swiftlint --strict,swiftlint analyze --strictand
swiftformat --lintare clean. The behaviour of the Options button isunchanged by this PR — it was unchanged by #5 too, which is the point.