Mac screensaver: update for MacOS 14.0 Sonoma #5411
Merged
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.
MacOS 14.0 Sonoma broke many third-party screensavers, including BOINC's. This PR addresses several issues:
[1] The most serious was that once the BOINC screensaver runs, the desktop remained black, leaving the user unable to access the desktop. The user had to log out using the keyboard shortcut to regain access. This is fixed.
[2] The BOINC screensaver can no longer run the default graphics boincscr or any project graphics, though project graphics still work when launched from the BOINC Manager using the Show graphics button.
To get around Apple's earlier sandbox restrictions on screensavers, we use IOSurfaceBuffers to allow the screensaver to display the project application's or boincscr's graphics. This involves the use of Mach communication. But Apple has added a new sandbox restriction on screensavers preventing the use of Mach communication.
I have been working with Apple Developer Technical Support trying to find a solution. At their recommendation, I have filed a bug report with Apple asking them to remove this new restriction, and we are waiting for their decision.
If Apple won't remove the new restriction, I have a possible new approach, but it involves significant changes in the code and would require all projects to at least relink their graphics apps with our updated libraries.
For now, the updated screensaver in this PR just shows a message "BOINC can't show screensaver graphics on this version of MacOS"
[3] Our installer has asked the user if they would like to set BOINC as their screensaver. If they answered yes, it would do that automatically. This ability is broken under MacOS 14.0. This is recognized as a bug, and I have filed a separate bug report with Apple for this issue, also at the recommendation of Apple Developer Technical Support. For now, the Installer does not offer that option when run on MacOS 14.