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 `StartupWMClass` to .desktop for easier window-app association #16791

Merged
merged 1 commit into from Feb 27, 2018

Conversation

Projects
None yet
3 participants
@Evpok
Contributor

Evpok commented Feb 20, 2018

Description of the Change

Just adds a StartupWMClass entry to atom.desktop. This helps window managers associating Atom's window with the .desktop file that started Atom. It should help with some issues relative atom in docks, such as missing or duplicated icons.

References

@iolsen

This comment has been minimized.

Contributor

iolsen commented Feb 27, 2018

🎉 thanks for the contribution!

@iolsen iolsen merged commit 5fdfd65 into atom:master Feb 27, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Evpok Evpok deleted the Evpok:startupwmclass-desktop branch Feb 28, 2018

@shadow-light

This comment has been minimized.

Contributor

shadow-light commented Sep 28, 2018

Did this work for anyone? I had to make "Atom" lowercase for it to work for me. Prior to that my atom windows would have no icon if launched from a terminal etc.

I'm happy to submit a new pull request to change this, as long as it won't stop it working for other users. I'm on Ubuntu 16.04

@Evpok

This comment has been minimized.

Contributor

Evpok commented Sep 28, 2018

@shadow-light Both cases work for me, which they should, since xprop gives WM_CLASS(STRING) = "atom", "Atom" for atom windows. Can you check what it gives for you ?

@shadow-light

This comment has been minimized.

Contributor

shadow-light commented Sep 28, 2018

Hi @Evpok, yes that's the same for me, but one of those is the class name and one is the class. I recently discovered this via xdotool. For example, with Firefox:

~ xprop | grep WM_CLASS
WM_CLASS(STRING) = "Navigator", "Firefox"
~ xdotool search --onlyvisible --class "Navigator"
~ xdotool search --onlyvisible --classname "Navigator"
62914577
~ xdotool search --onlyvisible --class "Firefox"
62914577
~ xdotool search --onlyvisible --classname "Firefox"
~ 

So it would seem that application icons are matched via the classname rather than the class. Note, you can't actually test this out with xdotool for Atom as it does a case-insensitive search.

I double checked and atom definitely needs to be lowercase for my system to match it. If both work on yours, then perhaps it would be safe to switch it to lowercase then?

@Evpok

This comment has been minimized.

Contributor

Evpok commented Sep 29, 2018

Sure, if it fixes the issue on your side, open a PR, by all means :-)

shadow-light added a commit to shadow-light/atom that referenced this pull request Sep 29, 2018

Fix atom.desktop for some Linux systems
For some linux systems the window manager does not associate atom.desktop with Atom processes unless the class name is in lowercase. See atom#16791
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment