diff --git a/src/posix/cocoa/i_common.h b/src/posix/cocoa/i_common.h index c0986b90a..beff4a33d 100644 --- a/src/posix/cocoa/i_common.h +++ b/src/posix/cocoa/i_common.h @@ -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 diff --git a/src/posix/cocoa/st_console.mm b/src/posix/cocoa/st_console.mm index b990b9b33..5aafa3935 100644 --- a/src/posix/cocoa/st_console.mm +++ b/src/posix/cocoa/st_console.mm @@ -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];