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

PWAs and shortcuts are associated with the main browser window #39

Closed
ludvigng opened this issue Mar 4, 2021 · 3 comments
Closed

PWAs and shortcuts are associated with the main browser window #39

ludvigng opened this issue Mar 4, 2021 · 3 comments

Comments

@ludvigng
Copy link

ludvigng commented Mar 4, 2021

Hi!

After granting chrome access to ~/.local/share/applications and ~/.local/share/icons, adding shortcuts to PWAs and other websites they are still associated with the launcher to chrome, meaning they are all grouped under the main window:

Skärmbild från 2021-03-04 11-09-05

Checking the WM_CLASSes, they seem to be the set correctly compared to the "regular" version of chrome and are the same for both:
Browser: WM_CLASS(STRING) = "google-chrome", "Google-chrome"
YouTube PWA: WM_CLASS(STRING) = "crx_agimnkijcaahngcdmfeangaknmldooml", "Google-chrome"

Comparing the desktop files, nothing really stands out.
Flatpak:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=YouTube
Exec='flatpak' 'run' '--branch=beta' '--arch=x86_64' '--command=/app/bin/chrome' 'com.google.Chrome' '--profile-directory=Default' '--app-id=agimnkijcaahngcdmfeangaknmldooml'
Icon=flatpak-com-google-Chrome-chrome-agimnkijcaahngcdmfeangaknmldooml-Default
StartupWMClass=crx_agimnkijcaahngcdmfeangaknmldooml

Regular chrome:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=YouTube
Exec=/usr/bin/google-chrome-stable --profile-directory=Default --app-id=agimnkijcaahngcdmfeangaknmldooml
Icon=chrome-agimnkijcaahngcdmfeangaknmldooml-Default
StartupWMClass=crx_agimnkijcaahngcdmfeangaknmldooml

The icons also doesn't show up properly in the launcher:
Skärmbild från 2021-03-04 11-05-59

@ludvigng
Copy link
Author

ludvigng commented Mar 4, 2021

Investigating closer, StartupWMClass seems to be missing from the main com.google.Chrome.desktop file, compared to the "regular" package:
StartupWMClass=Google-chrome

However, adding this to the desktop file doesn't actually fix the problem either way. Icons seem to have fixed themselves during the day somehow though.

@pedrofleck
Copy link

I have this issue too.

refi64 referenced this issue in refi64/flextop Apr 7, 2021
Otherwise, GNOME Shell won't match its StartupWMClass, so the
applications won't appear separately from the Flatpak app in the dock.

This also includes a system for migrating the affected desktop files
automatically.

Ref. flathub/org.chromium.Chromium#83 and flathub/com.google.Chrome#10
refi64 added a commit that referenced this issue Apr 7, 2021
This should fix #39.
@refi64 refi64 closed this as completed in 7a92797 May 26, 2021
@ArcaEge
Copy link

ArcaEge commented Jul 12, 2024

Why is this closed? It's still an issue for me, #47 hasn't been merged.
Edit: nevermind, it only occurs with the Chrome flag Preferred Ozone platform set to wayland (or auto). This still should be fixed though, since Chrome(ium) does not support fractional scaling without Preferred Ozone platform on default/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 a pull request may close this issue.

3 participants