Skip to content

shell-app-system: Do not compare startup-wm classes with full desktop IDs

When fetching the desktop ids into a map of startup-wm classes we meant to give the ones that match the desktop ID more priority, however this did not happen because we were always comparing a desktop file id, including the .desktop suffix, with a wm-class that generally does not include that.

This is the case of gnome-system-monitor, that provides two desktop files, one of which is OnlyShowIn=KDE but both have the same StartupWMClass and thus the first parsed is preferred, even though its desktop-id is gnome-system-monitor-kde.

As per this, remove the .desktop suffix when comparing it with the startup-wm-class, keeping the old check just in case.


Also improve the case to avoid picking non-GNOME desktop files in case there are better ones for us.

See: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2012645

Edited by Marco Trevisan

Merge request reports

Loading