mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Fix fullscreen on OS X
This commit is contained in:
parent
4f0aeafbed
commit
e3cb389c6a
|
@ -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
|
||||||
|
NSBorderlessWindowMask as NSUInteger
|
||||||
|
} else if attrs.decorations {
|
||||||
// Classic opaque window with titlebar
|
// Classic opaque window with titlebar
|
||||||
NSClosableWindowMask as NSUInteger |
|
NSClosableWindowMask as NSUInteger |
|
||||||
NSMiniaturizableWindowMask as NSUInteger |
|
NSMiniaturizableWindowMask as NSUInteger |
|
||||||
NSResizableWindowMask as NSUInteger |
|
NSResizableWindowMask as NSUInteger |
|
||||||
NSTitledWindowMask as NSUInteger,
|
NSTitledWindowMask as NSUInteger
|
||||||
(false, false) =>
|
} else {
|
||||||
// Opaque window without a titlebar
|
// Opaque window without a titlebar
|
||||||
NSClosableWindowMask as NSUInteger |
|
NSClosableWindowMask as NSUInteger |
|
||||||
NSMiniaturizableWindowMask as NSUInteger |
|
NSMiniaturizableWindowMask as NSUInteger |
|
||||||
NSResizableWindowMask as NSUInteger |
|
NSResizableWindowMask as NSUInteger |
|
||||||
NSTitledWindowMask as NSUInteger |
|
NSTitledWindowMask as NSUInteger |
|
||||||
NSFullSizeContentViewWindowMask as NSUInteger,
|
NSFullSizeContentViewWindowMask as NSUInteger
|
||||||
(_, true) =>
|
|
||||||
// Fully transparent window.
|
|
||||||
// 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_(
|
||||||
|
|
Loading…
Reference in a new issue