Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disabling screensaver while an application is running



Is there a 'proper' way of disabling the screensaver while an
application is running? Or do I have to simulate user input? I've seen
a pretty clean way to do this, but firing a timer every x seconds
seems a bit lame compared to telling the screensaver to not activate.


I checked out the link Troy sent, using IOKit, and got a bit excited (because I also felt like periodic "don't sleep" messages are lame ;).

After some testing, however, it looks like that only disables system sleep and display dimming, not disabling the screen saver. (I could be mistaken on this, so if I'm incorrect by all means set me straight).

So, if the above is correct, it looks like UpdateSystemActivity(OverallAct); is still the way to go (every ~30 seconds)... I find that putting it on a background thread is easy enough (and keeps random timer events off the main thread), but that might be overkill for your application.

--
[ christopher wright ]
email@hidden
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden

References: 
 >Disabling screensaver while an application is running (From: Chris Wood <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.