I want to be able to write a cross-platform screensaver that works on both Windows and macOS using the Pygame 2D graphics library in Python. On Windows, this is super easy - you just write your program with three possible command line arguments: /p for preview mode, /c for the configuration dialog mode, and /s for the actual full-screen screensaver mode. Then you just use pyinstaller to build an .exe file and rename the extension to .scr, and you're good to go. However, it seems that making a screensaver on macOS is a pretty convoluted process, and there was stuff about specific Objective-C functions that you had to write, and I didn't really understand the documentation. Could you please tell me if there is any way to simply get my Python Pygame program to build as a proper .saver file? Thanks!
Screen Saver
RSS for tagAnimate screen savers and interact with the screen saver infrastructure using Screen Saver.
Posts under Screen Saver tag
6 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I'm developing a ScreenSaverView which uses WKWebview internally.
This screensaver responsds to mouse events, and I'm using a helper app which is granted Accessibility permissions to watch mouseEvents and then serializes them to the Screen Saver, where they are recreated and send to the WKWebView.
This all works fine - the WKWebView can respond to mouseDown, mouseUp, MouseDrag, scrollWheel (etc.) events.
The one exception is that mouseMoved events are ignored.
I see a similar issue posted here: https://stackoverflow.com/questions/17057254/when-webview-is-added-to-a-specific-view-in-nswindow-hover-stops-working-how?rq=2 but that's from 2016 so not sure if it's relevant.
Things I've tried:
adding a NSTrackingArea to the WKWebView
setting the parent NSWindow.acceptsMouseEvents = true
Okay so in one of the new IOS 18 Beta’s you can select a specific wallpaper genre that has to do with Planets (Earth, Mars, Saturn, ex.). There is one called “Earth Detail” where it zooms in and when you open your iPhone it will do a pulse of a green circle (showing where you are in the world) pretty cool feature. In “Earth Detail” you can also see the clouds and all the lights during the night, but what if you could see the northern lights at that specific time when they are visible in the sky? I think this would be a minor feature but a cool little easter egg to have. Let me know what you guys think of this. Thanks!
Hello everyone,
I am reaching out to you today regarding an issue I am encountering with a customer who owns an iPhone 15 Pro. The customer purchased a new screen protector for the device, but there is a problem with the fit of the protector in the corners of the screen.
The protector does not adhere properly to the corners, and there is a small gap between the protector and the screen. As a result, there is a concern about damage to the screen in the event of a drop or bump.
I have tried several possible solutions, such as thoroughly cleaning the screen and protector before installation, but the problem persists.
Do you have any recommendations or possible solutions for this issue? I would appreciate any help you can provide in resolving the problem for the customer.
Hi all,
I've been playing around with making a screen saver using ScreenSaver.framework and having issues with (what appears to be) macOS caching the previous version of the screensaver until I reboot.
I have written a screen saver that works, however if I make some changes to the code, re-archive and reinstall the newly compiled screen saver still presents the old screen saver. I've tried incrementing the build number to no avail.
Does anyone have a solution to this?
My workflow :-
Uninstall and delete all instances of my screen saver.
Reboot
Open Xcode, compile, re-archive my screen saver.
Double-click the archived screen-saver, click to install for this user.
Test screensaver -- success!
Now,
Delete the screensaver by right-click on screensaver in System Settings, "Delete "
Make changes to my code, rearchive.
Double-click the archived screen-saver, click to install for this user.
Test screensaver -- fail! Still shows the old version of the screensaver.
Reboot machine
Test screensaver -- success! Screensaver now shows the changes I made.
Many thanks all.
I've run into a really weird bug with a macOS screen saver I've been developing using the ScreenSaver framework. It works fine on Ventura, but on Sonoma, when the user dismisses the screensaver, it continues to animate invisibly in the background using up CPU and GPU cycles. Even worse, when the user activates the screensaver a second time, yet another copy appears to be created, and so on. The call to stop animating is also never sent to the view, as far as I can tell.
I logged this as FB13041503 already, but I'm trying to come up with a workaround now, since this is still happening in the release version of macOS 14.0.
Any ideas how I can detect that the screensaver has been dismissed, so I can minimise my resource usage? I've even tried watching for things like NSWindowDidChangeOcclusionStateNotification but nothing seems to get called that I can use.