AudioSubmix reference fix; macOS window icon

This commit is contained in:
Jack Andersen
2018-01-13 20:37:17 -10:00
parent cbfd4ddad0
commit 5d310c008f
3 changed files with 16 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
#endif
namespace boo {class WindowCocoa; class GraphicsContextCocoa;}
@interface WindowCocoaInternal : NSWindow
@interface WindowCocoaInternal : NSWindow <NSWindowDelegate>
{
std::shared_ptr<boo::WindowCocoa> booWindow;
id touchBarProvider;
@@ -1608,11 +1608,23 @@ std::shared_ptr<IWindow> _WindowCocoaNew(SystemStringView title, NSOpenGLContext
NSWindowStyleMaskResizable
backing:NSBackingStoreBuffered
defer:YES];
self.delegate = self;
self.releasedWhenClosed = NO;
self.title = [NSString stringWithUTF8String:title.data()];
NSString* titleImgPath = [[NSBundle mainBundle] pathForResource:@"mainicon" ofType:@"icns"];
NSImage* titleImg = [[NSImage alloc] initByReferencingFile:titleImgPath];
[self setRepresentedURL:[NSURL URLWithString:@""]];
NSButton* iconButton = [self standardWindowButton:NSWindowDocumentIconButton];
[iconButton setImage:titleImg];
booWindow = bw;
return self;
}
- (BOOL)window:(NSWindow*)window shouldPopUpDocumentPathMenu:(NSMenu*)menu
{
return NO;
}
- (void)setFrameDefault
{
[self setFrame:[self genFrameDefault] display:NO];