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: Graham Cox via Cocoa-dev <email@hidden>
- Date: Mon, 29 Jun 2020 11:53:37 +1000
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
> On 29 Jun 2020, at 5:31 am, Gabriel Zachmann via Cocoa-dev
> <email@hidden> wrote:
>
> Yes, agreed. That is why I would like to disable ONLY the screensaver,
> NOT System Preferences / Security / Require password ...
>
_______________________________________________
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