Disabled fullscreen mode for OS X startup window

There is no use for auxiliary fullscreen window because it behaves really weird
This commit is contained in:
alexey.lysiuk 2016-02-28 10:45:56 +02:00 committed by Christoph Oelckers
parent d4f87203bd
commit 0fba6563c7
2 changed files with 12 additions and 0 deletions

View file

@ -145,6 +145,10 @@ enum
static const NSOpenGLPixelFormatAttribute NSOpenGLPFAAllowOfflineRenderers = NSOpenGLPixelFormatAttribute(96);
@interface NSWindow(SetCollectionBehavior)
- (void)setCollectionBehavior:(NSUInteger)collectionBehavior;
@end
#endif // prior to 10.5
@ -182,6 +186,8 @@ typedef NSInteger NSApplicationActivationPolicy;
- (NSRect)convertRectToBacking:(NSRect)aRect;
@end
static const NSWindowCollectionBehavior NSWindowCollectionBehaviorFullScreenAuxiliary = NSWindowCollectionBehavior(1 << 8);
#endif // prior to 10.7
#endif // COCOA_I_COMMON_INCLUDED

View file

@ -113,6 +113,12 @@ FConsoleWindow::FConsoleWindow()
[m_window center];
[m_window exitAppOnClose];
if (NSAppKitVersionNumber >= AppKit10_7)
{
// Do not allow fullscreen mode for this window
[m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
}
[[m_window contentView] addSubview:m_scrollView];
[m_window makeKeyAndOrderFront:nil];