🐧 🐛 Move the workaround to lib/browser/init.js

This commit is contained in:
Menci 2016-09-27 19:19:52 +08:00
parent 938b9e897a
commit ef45b67dbf
2 changed files with 5 additions and 5 deletions

View file

@ -162,5 +162,10 @@ require('./api/protocol')
// Set main startup script of the app.
const mainStartupScript = packageJson.main || 'index.js'
// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
process.env.XDG_CURRENT_DESKTOP = 'Unity';
}
// Finally load app's main.js and transfer control to C++.
Module._load(path.join(packagePath, mainStartupScript), Module, true)

View file

@ -58,8 +58,3 @@ if (process.platform === 'win32') {
process.windowsStore = true
}
}
// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
process.env.XDG_CURRENT_DESKTOP = 'Unity';
}