Skip to content
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

Set desktop file StartupWMClass if renamed #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TingPing
Copy link
Member

@TingPing TingPing commented Apr 9, 2018

This is just a heuristic but it seems to be usually correct.

@rh-atomic-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@alexlarsson
Copy link
Member

This seems weird. The majority of desktop files don't specify StartupWMClass, so with this change almost everyone will. The spec says:

Desktop entry spec extensions
===

StartupNotify=BOOLEAN

  If true, it is KNOWN that the application will send a "remove"
  message when started with the DESKTOP_LAUNCH_ID environment variable
  set.

StartupWMClass=STRING

  If true, it is KNOWN that the application will map at least one
  window with the given string as its WM class or WM name hint.

The ones that set StartupNotify=true rely on callers using the DESKTOP_LAUNCH_ID env var, and there is no need to set StartupWMClass. If StartupWMClass is set then we should not mess with it.

So, the two remaining cases are when StartupWMClass is unset and StartupNotify is false or unset.

The specs mention nothing about default values for StartupWMClass, and I understand that, because it seems risky to assume them, because if you get the wrong value or the app didn't set a WMClass then the startup spinner will go on forever. If StartupWMClass was not set, we just wouldn't use startup notification, which seems like a better default.

Do you have a reference to any code that relies on the WMClass matching the desktop file name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants