GNOME Dash: no dots for PWAs!

This apparently started happening w/GNOME 49 (though don’t quote me on that, as it may be older). GNOME Dash no longer shows Running App Indicators (dots or lines) for Chrome PWAs; PWAs are instead treated as regular Chrome windows. Please bring back Running App Indicators for Chrome PWAs!

The screenshot below shows a picture of (a fragment of) my GNOME Dash: note that GitHub, Reddit, and Facebook are Chrome PWAs that are currently running, yet there is no dot underneath. Initially I thought this was an issue with the Dash To Dock extension, but it quickly became clear that this problem, in fact, is inherited from GNOME’s Dash.

Please fix. Many thanks!

That could also be a client issue. If for example Chrome switched to Wayland, but had only implemented setting the application ID on X11, that would for example result in all Chrome windows being grouped under the Chrome icon. If that’s the case, then also when pressing Alt+F2, running lg there, and then going to the “Windows” section, the “wmclass” would refer to the same Chrome related ID for all these windows. Then the fix would be for Chrome to set different application IDs for the different PWAs using xdg_toplevel::set_app_id. As a workaround until then you could try switching Chrome to use X11.

1 Like

As you can clearly see from the screenshot below, the wmclass IDs are, indeed, different, so it looks like Chrome can’t be the culprit here.

Are you running Chrome as a snap or flatpak package? In those cases the grouping based on the package will take precedence.

Flatpak. It used to work fine a while ago though! How come it changed all of a sudden? And how can this state of affairs be changed? Can’t you guys revert back to grouping based on wmclass ID (for Flatpak apps, that is)?

The app/window matching code has not been changed significantly for many releases. Was there maybe a change on the Flatpak side or did you only recently start using Flatpak for Chrome?

No, I have been using the Chrome flatpak package for some time now, and, like I said, it used to work fine!

Looking at the code, the Flatpak app ID only takes precedence for Wayland clients, not for X11 clients. So I guess Chrome enabled Wayland by default recently. This will probably need a way to determine which .desktop files a window from a sandboxed application can claim to belong to and then support for this would need to be added to gnome-shell.

1 Like

Yes please, make it so! :grin:

Should I file a bug ticket … wherever you guys keep track of bugs?

I just remembered that the code I was thinking was X11 specific is used for Wayland as well (despite being named in a way that suggests it being X11 specific), so ignore my last comment.

So this is probably caused by a change in Chrome that causes the app ID (what is shown as “wmclass” in looking glass) to be different now and no longer match what is in the .desktop file. What is the file name and content of a .desktop file corresponding to one of those PWAs?

Looks like the ID is the same, as you can see from the screenshot below and the one I posted above. I am also including the code inside the .desktop file for the Facebook PWA.

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Facebook
Exec=flatpak 'run' '--command=/app/bin/chrome' 'com.google.Chrome' '--profile-directory=Default' '--app-id=kippjfofjhjlffjecoapiogbkgbpmgej'
Icon=chrome-kippjfofjhjlffjecoapiogbkgbpmgej-Default
StartupWMClass=crx_kippjfofjhjlffjecoapiogbkgbpmgej
X-Flatpak-Part-Of=com.google.Chrome
TryExec=/var/lib/flatpak/exports/bin/com.google.Chrome

Try changing the StartupWMClass to use chrome- instead of crx_ so it actually matches the wmclass from looking glass.

1 Like

No dice (see below). Note that I didn’t reboot: should I? :thinking:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Facebook
Exec=flatpak 'run' '--command=/app/bin/chrome' 'com.google.Chrome' '--profile-directory=Default' '--app-id=kippjfofjhjlffjecoapiogbkgbpmgej'
Icon=chrome-kippjfofjhjlffjecoapiogbkgbpmgej-Default
StartupWMClass=chrome-kippjfofjhjlffjecoapiogbkgbpmgej
X-Flatpak-Part-Of=com.google.Chrome
TryExec=/var/lib/flatpak/exports/bin/com.google.Chrome

Add the -Default as well.

1 Like

Awesome, that did it! :saluting_face: