Re: Preventing system sleep, QA1340 code does not seem to work
Re: Preventing system sleep, QA1340 code does not seem to work
- Subject: Re: Preventing system sleep, QA1340 code does not seem to work
- From: "Sean McBride" <email@hidden>
- Date: Wed, 13 Dec 2006 16:41:42 -0500
- Organization: Rogue Research
On 2006-12-12 14:55, Ethan Bold said:
>To be clear, the kIOMessageCanSystemSleep message only allows you to
>prevent IDLE sleep. If you close the clamshell or sleep via the Apple
>menu, your callback will never receive the kIOMessageCanSystemSleep
>message. There is no way to prevent non-idle sleeps.
That's ok, I'll take what I can get. :)
But does 'idle sleep' include the display? That is, if in the callback
I refuse idle sleep will both the display and cpu stay awake?
>That said, yes, this code should work in 10.3.9, 10.4.8, and 9A303. I
>use it all the time.
>
>* Are you getting any error returns from any of the IOKit or CF calls
>in main()?
No.
>* Where are your breaks/printfs/asserts - are you breaking on the
>invocation of your callback function itself? Or only in the
>kIOMessageCanSystemSleep code (which will not get called on a force
>sleep)?
Right at the start of the callback (MySleepCallBack()).
>Yep. I'm stumped.
I've put the project (and binary) here if anyone is interested. I've
trivially modified it from what's on the page. I'm stumped too!
<http://www.rogue-research.com/vtk/SleepTest.zip>
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden