Fix fullscreen on OS X

This commit is contained in:
Miranda Kastemaa 2015-12-11 23:23:23 +02:00
parent 4f0aeafbed
commit e3cb389c6a

View file

@ -396,24 +396,22 @@ impl Window {
} }
}; };
let masks = match (attrs.decorations, attrs.transparent) { let masks = if screen.is_some() || attrs.transparent {
(true, false) => // Fullscreen or transparent window
// Classic opaque window with titlebar NSBorderlessWindowMask as NSUInteger
NSClosableWindowMask as NSUInteger | } else if attrs.decorations {
NSMiniaturizableWindowMask as NSUInteger | // Classic opaque window with titlebar
NSResizableWindowMask as NSUInteger | NSClosableWindowMask as NSUInteger |
NSTitledWindowMask as NSUInteger, NSMiniaturizableWindowMask as NSUInteger |
(false, false) => NSResizableWindowMask as NSUInteger |
// Opaque window without a titlebar NSTitledWindowMask as NSUInteger
NSClosableWindowMask as NSUInteger | } else {
NSMiniaturizableWindowMask as NSUInteger | // Opaque window without a titlebar
NSResizableWindowMask as NSUInteger | NSClosableWindowMask as NSUInteger |
NSTitledWindowMask as NSUInteger | NSMiniaturizableWindowMask as NSUInteger |
NSFullSizeContentViewWindowMask as NSUInteger, NSResizableWindowMask as NSUInteger |
(_, true) => NSTitledWindowMask as NSUInteger |
// Fully transparent window. NSFullSizeContentViewWindowMask as NSUInteger
// No shadow, decorations or borders.
NSBorderlessWindowMask as NSUInteger
}; };
let window = IdRef::new(NSWindow::alloc(nil).initWithContentRect_styleMask_backing_defer_( let window = IdRef::new(NSWindow::alloc(nil).initWithContentRect_styleMask_backing_defer_(