mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
@@ -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_(
|
||||||
|
|||||||
Reference in New Issue
Block a user