Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- Subject: Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- From: Ken Thomases <email@hidden>
- Date: Tue, 22 Jan 2013 18:17:23 -0600
On Jan 22, 2013, at 10:16 AM, Clay Heaton wrote:
> 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.
Given that you're using -enterFullScreenMode:withOptions: and you do want to capture the screen, you should leave out NSFullScreenModeApplicationPresentationOptions. The options that you're passing are all implicit in capturing the display anyway.
Also, NSFullScreenModeApplicationPresentationOptions and NSFullScreenModeAllScreens are identifiers. You should use them as such, not as the contents of strings. (I don't know if the value of the string values named by those identifiers happens to match the identifiers themselves. Even if they do, you shouldn't rely on that.)
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden