blob: 1fcbdcd02c3def396e02bc7160d4afb4e59ee592 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// license:BSD-3-Clause
// copyright-holders:R. Belmont
//============================================================
//
// mamewfsindow.mm - our fullscreen window, subclassed from NSWindow
//
// Mac OSD by R. Belmont
//
//============================================================
#import "mamefswindow.h"
@implementation MAMEFSWindow
-(instancetype)init
{
NSRect screenRect = [[NSScreen mainScreen] frame];
self = [super initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES];
// Set the window level to be above the menu bar
[self setLevel:NSMainMenuWindowLevel+1];
[self setOpaque:YES];
[self setHidesOnDeactivate:YES];
return self;
}
-(BOOL)canBecomeKeyWindow
{
return YES;
}
- (void)keyDown:(NSEvent *)event
{
[[self windowController] keyDown:event];
}
@end
|