From deeda596896573a9ad9a5f24e0a7b2f8e6e46d39 Mon Sep 17 00:00:00 2001 From: Gabriel Martinez Date: Sun, 5 Mar 2017 14:50:39 -0800 Subject: [PATCH] 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. --- src/platform/macos/window.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform/macos/window.rs b/src/platform/macos/window.rs index 51c66018..09ec570d 100644 --- a/src/platform/macos/window.rs +++ b/src/platform/macos/window.rs @@ -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 };