Add simple fullscreen config

This commit is contained in:
sadick254
2020-08-24 10:38:42 +03:00
committed by Sadick
parent c087fcfb49
commit d9d4e37563
2 changed files with 13 additions and 1 deletions

View File

@@ -637,6 +637,13 @@ if (process.platform === 'darwin') {
description:
'Experimental: A `custom` title bar adapts to theme colors. Choosing `custom-inset` adds a bit more padding. The title bar can also be completely `hidden`.<br>Note: Switching to a custom or hidden title bar will compromise some functionality.<br>This setting will require a relaunch of Atom to take effect.'
};
configSchema.core.properties.simpleFullScreenWindows = {
type: 'boolean',
default: false,
description:
'Use pre-Lion fullscreen on macOS. This does not create a new desktop space for the atom on fullscreen mode.'
};
}
module.exports = configSchema;

View File

@@ -50,7 +50,8 @@ module.exports = class AtomWindow extends EventEmitter {
disableBlinkFeatures: 'Auxclick',
nodeIntegration: true,
webviewTag: true
}
},
simpleFullscreen: this.getSimpleFullscreen()
};
// Don't set icon on Windows so the exe's ico will be used as window and
@@ -364,6 +365,10 @@ module.exports = class AtomWindow extends EventEmitter {
return { x, y, width, height };
}
getSimpleFullscreen() {
return this.atomApplication.config.get('core.simpleFullScreenWindows');
}
shouldAddCustomTitleBar() {
return (
!this.isSpec &&