New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tray icon workaround for newer Ubuntu releases (fixes #9046) #9716

Merged
merged 2 commits into from Jun 9, 2017

Conversation

Projects
None yet
6 participants
@dakira
Contributor

dakira commented Jun 9, 2017

Starting with 17.04, Ubuntu sets XDG_CURRENT_DESKTOP to Unity:Unity7 which prevents tray icons from being displayed. There already is a workaround for a similiar situation (for ElementaryOS).

I tested this fix by @MarshallOfSound in Ubuntu 17.04, and regression-tested it on older releases. Everythings works as expected.

Fixes #9046

@dakira dakira changed the title from :penguin: Add tray icon workaround for newer Ubuntu releases (fixes #9046) to Add tray icon workaround for newer Ubuntu releases (fixes #9046) Jun 9, 2017

// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
// Workaround for electron/electron#5050 and electron/electron#9046
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESKTOP) !== -1) {

This comment has been minimized.

@kevinsawicki

kevinsawicki Jun 9, 2017

Contributor

Very minor but this could be:

['Pantheon', 'Unity:Unity7'].includes(process.env.XDG_CURRENT_DESKTOP)

Which is a little more concise.

@vanessayuenn vanessayuenn merged commit a6ea316 into electron:master Jun 9, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@vanessayuenn

This comment has been minimized.

Contributor

vanessayuenn commented Jun 9, 2017

Thank you so much @dakira!! 🍾

// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
// Workaround for electron/electron#5050 and electron/electron#9046
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].includes(process.env.XDG_CURRENT_DESKTOP)) {

This comment has been minimized.

This comment has been minimized.

@stewartlord

stewartlord Jul 12, 2017

Doesn't appear to fix it for Pantheon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment