Re: Minimizing my app kills timer ?
Re: Minimizing my app kills timer ?
- Subject: Re: Minimizing my app kills timer ?
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Mon, 4 May 2020 22:33:28 +0200
> 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.
Agreed.
Currently, AFAICS, all third-party screen savers run under the
legacyScreenSaver.
But the name suggests that could change some day.
> Screensaver engines run in a very controlled and limited environment.
yes.
> They need to be efficient. They need to treat user input differently.
Actually, as of Catalina, there is NO user input to screen savers any more - at
all :-(
Which is the main reason for this whole effort of making a stand-alone app (in
addition to the "crippled" screen saver).
> They treat activation totally differently. When you start trying to force
> such an engine to
I don't and I can't force the engine itself.
All I am doing is to include my subclass of ScreenSaverView in an app.
> 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,
That is what I'm doing.
I start my own timer, which periodically calls -animateOneFrame.
I call -stopAnimation when the app is hidden, etc.
Do you see any problems with that approach?
Best regards, Gabriel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden