Skip to content

Fix Chromium web app grouping in Cinnamon with manual StartupWMClass detection#395

Open
sohailb108 wants to merge 1 commit intolinuxmint:masterfrom
sohailb108:startupwmclass-detect-button
Open

Fix Chromium web app grouping in Cinnamon with manual StartupWMClass detection#395
sohailb108 wants to merge 1 commit intolinuxmint:masterfrom
sohailb108:startupwmclass-detect-button

Conversation

@sohailb108
Copy link
Copy Markdown

In Cinnamon, different Chromium web apps can get the icon of the first one launched and group together.

I found that StartupWMClass in the .desktop file didn't match the window class from xprop WM_CLASS and updating StartupWMClass to match fixed the issue.

Since Chromium sets the window class at runtime, correct automatic detection at add time sounds impossible.
So this PR adds a manual fix in Web Apps with a new toolbar button.

How to use it:

  • Select a Chromium-based web app from the list.
  • Click the newly added button (rightmost one) to launch it and start detection.
  • The cursor changes to a cross.
  • Click the launched app window.
  • xprop WM_CLASS is read, and the first WM_CLASS value is saved into StartupWMClass in the corresponding .desktop file.

How to test:

  • Create two different Chromium web apps.
  • Launch both and confirm they are grouped together with the same icon in the panel.
  • Apply the fix for each app using the new button.
  • Launch both again and confirm each one appears separately with the correct icon.
  • You can also open the .desktop file and verify that StartupWMClass was updated to the WM_CLASS value returned by xprop.

Changes:

  • Added a new toolbar button (rightmost) to the Web App management window.
  • Implemented the detection and update routine.

Fixes #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

All apps are being assigned the same icon in Cinnamon panel+6

1 participant