mirror of
https://github.com/enso-org/enso.git
synced 2025-01-02 01:41:53 +03:00
Use bordered windows for the electron app on non-MacOS platforms. (https://github.com/enso-org/ide/pull/1113)
Original commit: 4fd9734514
This commit is contained in:
parent
c1d3c3925f
commit
2ca5c63e74
@ -131,8 +131,7 @@ let styleOptionsGroup = 'Style Options:'
|
||||
|
||||
optParser.options('frame', {
|
||||
group : styleOptionsGroup,
|
||||
describe : 'Draw window frame',
|
||||
default : false,
|
||||
describe : 'Draw window frame. Defaults to `false` on MacOS and `true` otherwise.',
|
||||
type : `boolean`
|
||||
})
|
||||
|
||||
@ -177,6 +176,15 @@ function parseCmdArgs() {
|
||||
|
||||
let args = parseCmdArgs()
|
||||
|
||||
// Note: this is a conditional default to avoid issues with some window managers affecting
|
||||
// interactions at the top of a borderless window. Thus, we want borders on Win/Linux and
|
||||
// borderless on Mac. See https://github.com/enso-org/ide/issues/1101 and
|
||||
// https://github.com/electron/electron/issues/3647 for details.
|
||||
if (args.frame === undefined) {
|
||||
args.frame = (process.platform !== 'darwin')
|
||||
}
|
||||
|
||||
|
||||
if (args.windowSize) {
|
||||
let size = args.windowSize.split('x')
|
||||
let width = parseInt(size[0])
|
||||
@ -383,6 +391,7 @@ function urlParamsFromObject(obj) {
|
||||
function createWindow() {
|
||||
let webPreferences = secureWebPreferences()
|
||||
webPreferences.preload = path.join(root,'preload.js')
|
||||
|
||||
let windowPreferences = {
|
||||
webPreferences : webPreferences,
|
||||
width : windowCfg.width,
|
||||
|
Loading…
Reference in New Issue
Block a user