pop-os / cosmic-applets

WIP applets for cosmic-panel
GNU General Public License v3.0
190 stars 65 forks source link

app-list: Opening favorited firefox app opens the rpm instead of the flatpak. #258

Closed ryanabx closed 5 months ago

ryanabx commented 5 months ago

I'm running Fedora Silverblue with my COSMIC rpms overlayed on it: https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/

Fedora ships the RPM of firefox by default with silverblue, but I prefer to use the flatpak. I installed the flatpak, and set it as a favorite on my app list applet, but now when I open firefox it tries to open the RPM.

This is probably a namespacing issue, I wonder if the app list applet needs to save more information about the favorited app.

Drakulix commented 5 months ago

What cosmic-app-list saves is the app-id or name of the desktop file. Which are in fact different for the flatpak and the rpm installed firefox (they are org.mozilla.Firefox and firefox respectively).

However what likely breaks here is cosmic-app-lists mapping between toplevels and desktop files, as it matches by app_id and StartupWMClass (the latter being required for some x11 windows, which are not matching the app_id correctly). The flatpak sets this value to firefox, so libcosmic's desktop file helper probably replaces the flatpak entry with the rpm one, which is then subsequently stored when saving it to favorites...

So what needs to happen here is probably split these values into two separate ones in libcosmic and only match on StartupWMClass as a fallback, when purely matching by app-id isn't giving any results..