-
Notifications
You must be signed in to change notification settings - Fork 0
/
TMDBorderLessWindow.m
54 lines (43 loc) · 937 Bytes
/
TMDBorderLessWindow.m
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
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// TMDBorderLessWindow.m
// Dialog
//
// Created by Joachim Mårtensson on 2007-08-14.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import "TMDBorderLessWindow.h"
@implementation TMDBorderLessWindow
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:NO];
// [result setBackgroundColor:[NSColor clearColor]];
[self setAlphaValue:0];
[self setHasShadow:YES];
[self setOpaque:NO];
//[self makeKeyWindow];
return self;
}
- (BOOL)canBecomeMainWindow
{
return YES;
}
- (BOOL) canBecomeKeyWindow
{
return YES;
}
-(BOOL)acceptsFirstResponder
{
return YES;
}
- (BOOL)showsResizeIndicator
{
return NO;
}
-(BOOL)resignFirstResponder
{
return NO;
}
@end