From 08a358228bf92edf83ba155207d20eb07c4a3b1d Mon Sep 17 00:00:00 2001 From: Philipp Brumm Date: Wed, 6 Jul 2016 13:31:50 +0200 Subject: [PATCH] move title bar setting check into method and check for isSpec as well --- src/main-process/atom-window.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index efddf6146..d358ac93f 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -40,13 +40,13 @@ class AtomWindow if process.platform is 'linux' options.icon = @constructor.iconPath - if process.platform is 'darwin' and global.atomApplication.config.get('core.useCustomTitleBar') + if @applyTitleBarSetting() options.titleBarStyle = 'hidden' @browserWindow = new BrowserWindow options global.atomApplication.addWindow(this) - if process.platform is 'darwin' and global.atomApplication.config.get('core.useCustomTitleBar') + if @applyTitleBarSetting() @browserWindow.setSheetOffset(23) @handleEvents() @@ -205,6 +205,11 @@ class AtomWindow [width, height] = @browserWindow.getSize() {x, y, width, height} + applyTitleBarSetting: -> + not @isSpec and + process.platform is 'darwin' and + global.atomApplication.config.get('core.useCustomTitleBar') + close: -> @browserWindow.close() focus: -> @browserWindow.focus()