Bug 358277 - Chrome apps assuming same icon from chrome browser, in Icon-Only Task Manager
Summary: Chrome apps assuming same icon from chrome browser, in Icon-Only Task Manager
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.25.3
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL: https://chromium-review.googlesource....
Keywords:
: 424613 431288 439104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-20 20:39 UTC by romuluspb
Modified: 2022-11-16 19:17 UTC (History)
25 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.1


Attachments
exemple of a chrome app behavior (110.27 KB, image/png)
2016-01-20 20:45 UTC, romuluspb
Details
attachment-22754-0.html (215 bytes, text/html)
2022-06-02 18:50 UTC, Guido
Details

Note You need to log in before you can comment on or make changes to this bug.
Description romuluspb 2016-01-20 20:39:24 UTC
We can have different icons for chrome apps, but when they are executed, they assume chrome browser icon identity.

Reproducible: Always

Steps to Reproduce:
1. install any app, like whatschrome app
2. hold and drag the chrome  app from kde launcher to the icon only task manager
3. open it

Actual Results:  
the app instance turns into an chrome instance

Expected Results:  
it stay with it icons identification.

The best approach is to turn possible that an icon  identity be ruled by windows class, its very consistent and many users utilize this to for example set more uniform windows decoration for chrome apps.
Comment 1 romuluspb 2016-01-20 20:45:18 UTC
Created attachment 96759 [details]
exemple of a chrome app behavior
Comment 2 Kai Uwe Broulik 2016-06-06 20:07:07 UTC
Git commit 92efc6ca6ec3c1c1c34a777c470337d4fde4b0c1 by Kai Uwe Broulik.
Committed on 06/06/2016 at 20:05.
Pushed by broulik into branch 'master'.

[Libtaskmanager] Add support for regular expression mapping

This allows more complicated rules, useful for matching Chrome webapps to their
respective desktop file where we need to change crx_foo to chrome-foo-default.
Related: bug 356609
FIXED-IN: 5.7.0

Differential Revision: https://phabricator.kde.org/D1673

M  +6    -0    libtaskmanager/taskmanagerrulesrc
M  +47   -0    libtaskmanager/xwindowtasksmodel.cpp

http://commits.kde.org/plasma-workspace/92efc6ca6ec3c1c1c34a777c470337d4fde4b0c1
Comment 3 Matt Day 2021-05-06 13:34:05 UTC
This issue happens for me in Wayland in Plasma 5.20 and 5.21.

Switching to X11 it works as expected.
Comment 4 Nate Graham 2021-09-12 14:57:07 UTC
*** Bug 431288 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2021-09-12 14:57:12 UTC
*** Bug 424613 has been marked as a duplicate of this bug. ***
Comment 6 Matt Day 2021-10-23 09:11:22 UTC
*** Bug 439104 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2022-01-12 17:19:06 UTC
*** Bug 447845 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-01-12 17:21:22 UTC
This is an upstream issue which will be fixed by https://chromium-review.googlesource.com/c/chromium/src/+/3383817, once it's merged.
Comment 9 Nicolas Fella 2022-01-12 17:26:37 UTC
well, it's not really strictly an upstream issue. Chrome adding support for our non-standard hint is nice and fixed the issue, but there's still a bug in our XWayland support (as described in https://bugs.kde.org/show_bug.cgi?id=447845) that needs fixing
Comment 10 Nate Graham 2022-01-13 19:00:23 UTC
OK, re-opened that.
Comment 11 Bug Janitor Service 2022-01-23 20:06:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1396
Comment 12 Szymon Łągiewka 2022-03-02 12:59:56 UTC
My two pennies worth:

Just updated Chrome to v99. I use Ozone/Wayland backend. This release sets proper Icons for Chrome apps for me. Tested with Spotify and Tidal. The icon is also properly set for all effects presenting window with its icon visible, i.e. the overview effect.
Comment 13 Matt Day 2022-03-10 07:06:40 UTC
Confirming this works with both Chrome 99.0.4844.51 and Brave 1.36.111 - the icons work as expected.
Comment 14 KOT040188 2022-03-30 17:49:48 UTC
Maybe I have a similar problem https://bugs.kde.org/show_bug.cgi?id=452005
Comment 15 Nicolas Fella 2022-04-14 11:20:45 UTC
Git commit 7b94f03c0f5fec052454a1c8d6faec0aff2ce0cb by Nicolas Fella.
Committed on 14/04/2022 at 11:14.
Pushed by nicolasfella into branch 'master'.

[libtaskmanager] Consider resource name for XWayland windows

Like we do in an X11 session
Related: bug 447845

M  +1    -1    libtaskmanager/waylandtasksmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/7b94f03c0f5fec052454a1c8d6faec0aff2ce0cb
Comment 16 Guido 2022-06-02 18:12:05 UTC
Sorry to reopen but I still have not the right icon on X11 on Plasma 5.24.5, google chrome 102
Comment 17 Nate Graham 2022-06-02 18:44:45 UTC
The KDE fix is in Plasma 5.25. Please re-open only once you're using that version, if it's still happening.
Comment 18 Guido 2022-06-02 18:50:54 UTC
Created attachment 149416 [details]
attachment-22754-0.html

sorry, I didn't understand, my mistake
Comment 19 logan.clarke 2022-06-17 11:44:12 UTC
This is still happening for me with both Brave and MS Edge.

Microsoft Edge
Version 102.0.1245.44 (Official build) (64-bit)

Brave
Version 1.39.122 Chromium: 102.0.5005.115 (Official Build) (64-bit)

Works as expected on X11.

Operating System: openSUSE Tumbleweed 20220614
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 20 Guido 2022-06-18 17:56:17 UTC
on X11 the bug is still there with google chrome
Comment 21 Guido 2022-06-18 17:57:44 UTC
(In reply to Guido from comment #20)
> on X11 the bug is still there with google chrome

Operating System: Manjaro Linux
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4
Kernel Version: 5.18.5-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 22 lupccs 2022-07-24 16:20:43 UTC
Latest Kde Neon and Chrome here, X11, same problem and an interesting information:
It all works properly when I use the icon sets that came with my default system (Breeze, breeze dark, oxygen) but it doesn't when I use other icon themes that I installed later through plasma settings. Anyway I think I had the same problem with lubuntu 20.04
Please also notice that if you manually change the icon it will work as expected, doesn't matter the icon set
also, chrome apps manually created by --app=www.duckduckgo.com work properly, doesn't matter the icon set
Comment 23 husimo 2022-09-10 09:05:00 UTC
Hello, same problem :

Operating System: Fedora Linux 36
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.7-200.fc36.x86_64 (64-bit)
Graphics Platform: Wayland

What's weird it's that when app is starting, icon is appearing correctly, then it is replaced with the Chrome's one.

I'm using Kinoite but tested using Google Chrome (105.0.5195.102) installed via RPM and Ungoogled Chromium (105.0.5195.102) installed via flatpak.

Thank you
Comment 24 Mladen Milinkovic, Max 2022-10-14 14:10:41 UTC
Git commit 1e6180d8e75b10e97926d308fe9df38b710a91fe by Mladen Milinkovic.
Committed on 14/10/2022 at 13:52.
Pushed by nicolasfella into branch 'master'.

Handle multiple desktop files with different StartupWMClass

Some system installed apps define common/default StartupWMClass in
system-installed .desktop file.

Application then create extra .desktop files in user's local
applications directory with additional (more specific) StartupWMClass
entry.

This patch will match specific window class (WM_CLASS instance name)
before matching common window class (WM_CLASS class name).

See: https://www.x.org/releases/X11R7.7/doc/xorg-docs/icccm/icccm.html#WM_CLASS_Property

M  +7    -7    libtaskmanager/tasktools.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/1e6180d8e75b10e97926d308fe9df38b710a91fe
Comment 25 Nicolas Fella 2022-10-14 14:12:27 UTC
Git commit 735f350c1506bb06e87fdd9a151eed323384452e by Nicolas Fella, on behalf of Mladen Milinkovic.
Committed on 14/10/2022 at 14:12.
Pushed by nicolasfella into branch 'Plasma/5.26'.

Handle multiple desktop files with different StartupWMClass

Some system installed apps define common/default StartupWMClass in
system-installed .desktop file.

Application then create extra .desktop files in user's local
applications directory with additional (more specific) StartupWMClass
entry.

This patch will match specific window class (WM_CLASS instance name)
before matching common window class (WM_CLASS class name).

See: https://www.x.org/releases/X11R7.7/doc/xorg-docs/icccm/icccm.html#WM_CLASS_Property
(cherry picked from commit 1e6180d8e75b10e97926d308fe9df38b710a91fe)

M  +7    -7    libtaskmanager/tasktools.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/735f350c1506bb06e87fdd9a151eed323384452e
Comment 26 keydieyeah 2022-10-19 09:12:48 UTC
KDE Plasma 5.26.1 did not fix this issue for me.
Comment 27 Ilya Bizyaev 2022-10-23 14:26:53 UTC
[Reopening according to the comment]
Comment 28 Mladen Milinkovic, Max 2022-10-24 12:31:12 UTC
(In reply to keydieyeah from comment #26)
> KDE Plasma 5.26.1 did not fix this issue for me.

What OS are you using?
Wayland or X11?
Google Chrome or Chromium?
thanks
Comment 29 keydieyeah 2022-10-24 19:54:54 UTC
(In reply to Mladen Milinkovic, Max from comment #28)
> (In reply to keydieyeah from comment #26)
> > KDE Plasma 5.26.1 did not fix this issue for me.
> 
> What OS are you using?
> Wayland or X11?
> Google Chrome or Chromium?
> thanks

I'm using Arch Linux/Wayland/NVIDIA. 
I tried it with Brave and Chromium from the Arch repository. I also tried with Chrome and Edge in Flathub repository.
I'm having the same problem with all of them. When the web application and browser are open at the same time, they merge into a single icon.
I don't know if this is just happening to me.
Thanks.
Comment 30 Mladen Milinkovic, Max 2022-10-24 22:01:38 UTC
(In reply to keydieyeah from comment #29)
> (In reply to Mladen Milinkovic, Max from comment #28)
> > (In reply to keydieyeah from comment #26)
> > > KDE Plasma 5.26.1 did not fix this issue for me.
> > 
> > What OS are you using?
> > Wayland or X11?
> > Google Chrome or Chromium?
> > thanks
> 
> I'm using Arch Linux/Wayland/NVIDIA. 
> I tried it with Brave and Chromium from the Arch repository. I also tried
> with Chrome and Edge in Flathub repository.
> I'm having the same problem with all of them. When the web application and
> browser are open at the same time, they merge into a single icon.
> I don't know if this is just happening to me.
> Thanks.

The last patch (5.26.1) fixed it for me with Brave/Chromium from Arch repository - only difference from you is I'm still using X11.
Will try tomorrow with Wayland and hopefully reproduce/fix it, if no one else is looking into it already.
Comment 31 Bug Janitor Service 2022-10-25 12:13:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2264
Comment 32 Alex 2022-10-27 04:31:06 UTC
Also it's not resolved for me (Chrome, KDE Neon 5.26.2 wayland) 

Every Chrome app goes under the same icon. The behavior is normal under X11
Comment 33 Tamás Nagy 2022-10-28 12:06:15 UTC
It has not fixed for me either. Neon 5.26.2, all chrome app icons appear under the browser's icon.
Comment 34 Nate Graham 2022-10-28 16:48:03 UTC
Additional KWin changes are required to fully fix it for some people; see https://invent.kde.org/plasma/kwin/-/merge_requests/3113. That's only in Plasma 5.27, so folks who are still affected will have to wait until then.
Comment 35 Jin Liu 2022-11-14 11:47:08 UTC
FYI, you can use window rules to set the correct icon, as a temporary fix before the above mentioned 5.27 release:

1. System Settings - Window Management - Window Rules - Add New...
2. Bring the buggy app window side-by-side with system settings.
3. Click "Detect Window Properties..." in the bottom.
4. Move the crosshair to the buggy window and click.
5. Click "Window class (application)".
6. Click "Add Property..." in the bottm left.
7. Click "Desktop file name".
8. Enter the base name of the desktop file (e.g. for vscode, "visual-studio-code").
9. Click "Apply".
10. The icon should be fixed immediately.
Comment 36 Jin Liu 2022-11-14 11:50:09 UTC
(In reply to Jin Liu from comment #35)
> FYI, you can use window rules to set the correct icon, as a temporary fix
> before the above mentioned 5.27 release:
> 
> 1. System Settings - Window Management - Window Rules - Add New...
> 2. Bring the buggy app window side-by-side with system settings.
> 3. Click "Detect Window Properties..." in the bottom.
> 4. Move the crosshair to the buggy window and click.
> 5. Click "Window class (application)".
> 6. Click "Add Property..." in the bottm left.
> 7. Click "Desktop file name".
> 8. Enter the base name of the desktop file (e.g. for vscode,
> "visual-studio-code").
> 9. Click "Apply".
> 10. The icon should be fixed immediately.

You can find the base name of the desktop file by right-clicking on the app icon in Kickoff and select "Edit".
Comment 37 guimarcalsilva 2022-11-16 19:17:04 UTC
I'm reopening this since I can reproduce it on a fully updated Neon Unstable (Plasma 5.26.80, Frameworks 5.100.0, and QT 5.15.7) and Chrome Dev (109.0.5410.0).

It's possible to trigger the bug if you launch a web application while the browser is already open. If the browser is closed and you open a web application and then open the browser, the web application will keep its own icon and the browser will also have its own icon (as expected), however, if you open any other web application it will be grouped with the browser window. Mind you this is while running the browser in its default XWayland mode.

If you make the browser open in native Wayland mode (go to chrome:flags and change the flag "Preferred Ozone platform" to Wayland and restart the browser) the behavior will change. Now, opening the browser will make it always have a generic Wayland icon, but web apps will have their own icon (as expected), no matter if the browser is opened first or not.