Skip to content

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?

@bbhtt
Copy link
Contributor

bbhtt commented Oct 17, 2025

I'm not sure if it's f-b's job to integrate apps with mismatched IDs to the DE. The rename-* properties are the bare minimum, being done to let flatpak export them and are basically an interim solution until apps fix their desktop file names and appids etc.

Also afaik this will only work on X11

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.

4 participants