Support multiple inherited ubuntu session for indicators
Multiple sessions inherits the "ubuntu" base settings properties in ubuntu. One of the most popular one is communitheme: the next ubuntu default theme has its dedicated session, with thus duplicated indicators for dropbox. Rather than a string comparison for ubuntu, only match a substring then. XDG_CURRENT_DESKTOP can be of form: "communitheme:ubuntu:GNOME", "ubuntu:GNOME", … Fixes: #12843.
This commit is contained in:
parent
9c8952aef0
commit
811ae1a936
1 changed files with 4 additions and 2 deletions
|
@ -163,9 +163,11 @@ require('./api/protocol')
|
|||
const mainStartupScript = packageJson.main || 'index.js'
|
||||
|
||||
// Workaround for electron/electron#5050 and electron/electron#9046
|
||||
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7', 'ubuntu:GNOME', 'pop:GNOME'].includes(process.env.XDG_CURRENT_DESKTOP)) {
|
||||
if (process.platform === 'linux') {
|
||||
if (['Pantheon', 'Unity:Unity7', 'pop:GNOME'].includes(process.env.XDG_CURRENT_DESKTOP) || process.env.XDG_CURRENT_DESKTOP.includes('ubuntu')) {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue