Simple Mandelbrot fractal for OSX and iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

41 lines
1.1 KiB

//
//
// OSX GLEssentials
//
// Copied from the Apple GLEssentials
//
//
#import "FullscreenWindow.h"
@implementation FullscreenWindow
- (id)init {
// Create a screen-sized window on the display you want to take over
// Initialize the window making it size of the screen and borderless
NSRect screenRect = [[NSScreen mainScreen] frame];
if(self = [super initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES]){
self.level = NSMainMenuWindowLevel + 1; // Set the window level to be above the menu bar to cover everything else
self.opaque = YES; // Set opaque
self.hidesOnDeactivate = YES; // Hide this when user switches to another window (or app)
}
return self;
}
- (BOOL)canBecomeKeyWindow {
// Return yes so that this borderless window can receive input
return YES;
}
- (void)keyDown:(NSEvent *)event {
// Implement keyDown since controller will not get [ESC] key event which
// the controller uses to kill fullscreen
[self.windowController keyDown:event];
}
@end