• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Something stopping power managment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Something stopping power managment
      • From: Mike Paquette <email@hidden>
  • Prev by Date: Re: top broken on PPC?
  • Next by Date: Core Data, NSOutlineView and NSSortDescriptors
  • Previous by thread: Re: Handling malformed xml and preserving newlines while creating NSXmlDocument
  • Next by thread: Re: Something stopping power managment
  • Index(es):
    • Date
    • Thread