mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Clean up macOS window style logic
* Remove NSTitledWindowMask for windows with no decorations. This makes sure that they do not have a title bar. * Transparency is not be taken into account as we could have a window with a titlebar or without that is transparent.
This commit is contained in:
parent
0b530b026d
commit
deeda59689
|
@ -311,23 +311,22 @@ impl Window {
|
|||
}
|
||||
};
|
||||
|
||||
let masks = if screen.is_some() || attrs.transparent {
|
||||
// Fullscreen or transparent window
|
||||
let masks = if screen.is_some() {
|
||||
// Fullscreen window
|
||||
appkit::NSBorderlessWindowMask as NSUInteger |
|
||||
appkit::NSResizableWindowMask as NSUInteger |
|
||||
appkit::NSTitledWindowMask as NSUInteger
|
||||
} else if attrs.decorations {
|
||||
// Classic opaque window with titlebar
|
||||
// Window with a titlebar
|
||||
appkit::NSClosableWindowMask as NSUInteger |
|
||||
appkit::NSMiniaturizableWindowMask as NSUInteger |
|
||||
appkit::NSResizableWindowMask as NSUInteger |
|
||||
appkit::NSTitledWindowMask as NSUInteger
|
||||
} else {
|
||||
// Opaque window without a titlebar
|
||||
// Window without a titlebar
|
||||
appkit::NSClosableWindowMask as NSUInteger |
|
||||
appkit::NSMiniaturizableWindowMask as NSUInteger |
|
||||
appkit::NSResizableWindowMask as NSUInteger |
|
||||
appkit::NSTitledWindowMask as NSUInteger |
|
||||
appkit::NSFullSizeContentViewWindowMask as NSUInteger
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue