mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
commit
87f0edea7b
|
@ -396,26 +396,24 @@ 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_(
|
||||||
frame,
|
frame,
|
||||||
masks,
|
masks,
|
||||||
|
|
Loading…
Reference in a new issue