Something stopping power managment
Something stopping power managment
- Subject: Something stopping power managment
- From: Andrew James <email@hidden>
- Date: Mon, 23 Apr 2007 20:04:04 +0930
Hi,
Something in side my application is stopping the system from turning
the screen off and sleeping, etc. Im suspecting its then
SetSystemUiMode, if so how could i disable the stuff it disables but
keep power managment.
if (!allScreens) {
if(CGCaptureAllDisplays() != kCGErrorSuccess) {
NSLog(@"Could not capture all displays");
}
if(CGDisplayHideCursor(kCGDirectMainDisplay) != kCGErrorSuccess) {
NSLog(@"Could not hide cursor");
}
} else {
if(CGDisplayCapture(kCGDirectMainDisplay) != kCGErrorSuccess) {
NSLog(@"Could not capture main display");
}
}
// hide menu bar, hide dock, disable process switching (cmd+alt+tab),
force-quit etc.:
OSStatus Error = SetSystemUIMode(
( kUIModeAllHidden * !(secLevel & 020) | kUIModeNormal *
(secLevel & 020 != 0) ),
(kUIOptionDisableForceQuit * !(secLevel & 01) |
kUIOptionDisableProcessSwitch * !(secLevel & 02) |
kUIOptionDisableSessionTerminate * !(secLevel & 04) |
kUIOptionDisableAppleMenu * !(secLevel & 010) )
);
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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