(no title)
cwizou | 4 months ago
I was gonna warn you about a bug in macOS 15+ where your screensaver stays around after you go back to the desktop, but for some reason your code seems to avoid that issue. I'm not quite sure how, as you don't hook stopAnimation or any event apart from the deinit. But it works, so, massive kudos, I'll have to try and understand why !
hauxir|4 months ago
look at the animateoneframe function, there's the workaround
cwizou|4 months ago
You check if the screen is locked, and if not, kill the host. But screen is not locked in System Settings. So basically, you're killing the host process every 2 seconds (and macOS, at least in Tahoe, restarts it, it doesn't in previous macOS versions).
That's also what causes your issues with "Options" not working (because you killed the instance that was linked to that button). The way we workaround it usually is to hook a system event.
You can check https://github.com/AerialScreensaver/ScreenSaverMinimal
Look for handleWillStopNotification and com.apple.screensaver.willstop
cwizou|4 months ago
FYI that works 99% of the time, but for some people it sometimes crashes (because we exit our host container - legacyScreenSaver.appex - and sometimes if you do it at a wrong time things just hang).