diff --git a/.gitignore b/.gitignore index a36df82c..9fdb6f01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ Cargo.lock target/ +rls/ *~ #*# diff --git a/CHANGELOG.md b/CHANGELOG.md index 4502d959..d6897341 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - On X11, `Window::hidpi_factor` returns values from XRandR rather than the inaccurate values previously queried from the core protocol. - On X11, the primary monitor is detected correctly even when using versions of XRandR less than 1.5. - `MonitorId` now implements `Debug`. +- Fixed bug on macOS where using `with_decorations(false)` would cause `set_decorations(true)` to produce a transparent titlebar with no title. # Version 0.14.0 (2018-05-09) diff --git a/src/platform/macos/window.rs b/src/platform/macos/window.rs index 1a1c168e..1ed5086d 100644 --- a/src/platform/macos/window.rs +++ b/src/platform/macos/window.rs @@ -573,23 +573,22 @@ impl Window2 { let app = match Window2::create_app(pl_attribs.activation_policy) { Some(app) => app, - None => { + None => { let _: () = unsafe { msg_send![autoreleasepool, drain] }; return Err(OsError(format!("Couldn't create NSApplication"))); }, }; - let window = match Window2::create_window(&win_attribs, &pl_attribs) - { - Some(window) => window, - None => { + let window = match Window2::create_window(&win_attribs, &pl_attribs) { + Some(res) => res, + None => { let _: () = unsafe { msg_send![autoreleasepool, drain] }; return Err(OsError(format!("Couldn't create NSWindow"))); }, }; let view = match Window2::create_view(*window) { Some(view) => view, - None => { + None => { let _: () = unsafe { msg_send![autoreleasepool, drain] }; return Err(OsError(format!("Couldn't create NSView"))); }, @@ -778,11 +777,6 @@ impl Window2 { window.setMovableByWindowBackground_(YES); } - if !attrs.decorations { - window.setTitleVisibility_(appkit::NSWindowTitleVisibility::NSWindowTitleHidden); - window.setTitlebarAppearsTransparent_(YES); - } - window.center(); window });