That's actually what I'm doing at the moment:

    NSApplicationPresentationOptions options = 
NSApplicationPresentationHideDock + 
NSApplicationPresentationDisableProcessSwitching + 
NSApplicationPresentationHideMenuBar;
    NSNumber *presentationOptions = [NSNumber numberWithUnsignedLong:options];
    NSArray *keys   = [NSArray arrayWithObjects:@"NSFullScreenModeAllScreens", 
@"NSFullScreenModeApplicationPresentationOptions", nil];
    NSArray *values = [NSArray arrayWithObjects:[NSNumber numberWithBool:YES], 
presentationOptions, nil];
    NSDictionary *fullScreenOptions = [[NSDictionary alloc] 
initWithObjects:values forKeys:keys];
    
    [glView_ enterFullScreenMode:[NSScreen mainScreen] 
withOptions:fullScreenOptions];

There are a few problems:
- The F4 key still allows process switching (Kiosk mode bug with 
NSApplicationPresentationDisableProcessSwitching; radar ID 12358575)
- The function keys still pass through to the system (iTunes, brightness, etc.)

The application is for toddlers 
(https://itunes.apple.com/us/app/toddler-typer/id566326332?mt=12). Several 
months of use and feedback show that they find and find joy from pressing the 
keys that pass through to the system. Since I'm trying to create an environment 
where they won't mess up anything on the computer, I don't really want them 
switching processes, etc.

I tried to subclass NSApplication to capture the system keys, but they are 
dispatched to the system regardless of what I do therein.

Hence, I was trying to capture the screen. Any other ideas?

Thanks,
Clay

On Jan 22, 2013, at 11:00 AM, Kyle Sluder <k...@ksluder.com> wrote:

> On Tue, Jan 22, 2013, at 07:50 AM, Clay Heaton wrote:
>> 
>> I've read through the Apple display capturing guide, yet I always end up
>> with a black screen (instead of the proper contents of my NSOpenGLView)
>> when I try to capture the display. I suspect that I'm not assigning the
>> proper context when using CGDisplayCapture(), but I'm getting confused
>> with contexts and can't figure out what's gone awry. 
> 
> Don't capture the display. It's discouraged nowadays because it will
> prevent the user from seeing important things like the "Your battery is
> about to die" message. It also doesn't get you any net performance gain;
> fullscreen OpenGL contexts have been deprecated for a couple OS releases
> now.
> 
> Send -enterFullScreenMode:withPresentationOptions: to your OpenGL view.
> You can pass a ton of arguments to it to disable the menu bar, app
> switching, etc.  If you want to render at a lower resolution than the
> display, render to a texture of the appropriate size and then draw that
> texture in a fullscreen quad.
> 
> --Kyle Sluder


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to