On May 4, 2020, at 03:28:23, Gabriel Zachmann <z...@cs.uni-bremen.de> wrote:
> 
> You mean, it could happen that Apple decides to make ScreenSaverView a 
> subclass of some class other than NSView ? 
> (currently, it is a subclass of NSView)

No, I mean just what I said. It's not guaranteed or even suggested that 
ScreenSaverView be used with anything other than a screensaver.

> I agree that with Apple you never know what massive changes are waiting 
> around the corner. But, are there other reasons why you recommend against 
> using ScreenSaverView?

The screensaver animation in macOS is reliant on the engine that drives it. 
Recently that changed from an older engine to what we can only guess is a newer 
one, but some of them still run in what is known as a newly named 
legacyScreenSaver, yet ScreenSaverEngine still fits in there somehow. We don't 
know how it works and we don't *need* to know. Screensaver engines run in a 
very controlled and limited environment. They need to be efficient. They need 
to treat user input differently. They treat activation totally differently. 
When you start trying to force such an engine to run in a normal app that can 
deactivate, hide, minimize, etc, you're throwing it all kinds of things it 
isn't designed to handle.

If you really want to run your screensaver animation in a non-screensaver app, 
you'll need to control the animation, and rework your classes so you have one 
class that is used by both the screensaver and your app, and do the actual 
drawing in that class. It will be called by animateOneFrame in the screensaver 
and by what animation engine you come up with in your app.

--
Steve Mills
Drummer, Mac geek

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to