Re: Prevent screen saver from starting, but don't prevent computer sleep
Re: Prevent screen saver from starting, but don't prevent computer sleep
- Subject: Re: Prevent screen saver from starting, but don't prevent computer sleep
- From: John Joyce via Cocoa-dev <email@hidden>
- Date: Mon, 29 Jun 2020 18:32:28 +0900
>
> On Jun 29, 2020, at 10:53, Graham Cox via Cocoa-dev
> <email@hidden> wrote:
>
> In the “old days”, your app could periodically call UpdateSystemActivity(
> UsrActivity ) to prevent the screensaver kicking in. This has been deprecated
> since 10.8, but the header for that function says it can be replaced by
> IOPMAssertionCreateWithName(). I haven’t looked at that in detail or used it
> myself, but one of the defines for that function is
> ‘kIOPMAssertionTypePreventUserIdleDisplaySleep’, which appears to do the same
> thing as the old UpdateSystemActivity() call.
>
> Apologies if you already discussed this and rejected it for some reason, but
> otherwise, it may be worth checking out.
>
> —Graham
I think those assertions are called in caffeinate source ;)
_______________________________________________
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