Bug 455368

Summary: Present Windows effect uses the wrong icon
Product: [Plasma] kwin Reporter: Christian (Fuchs) <kde>
Component: effects-present-windowsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate
Priority: NOR    
Version First Reported In: 5.25.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of the issue

Description Christian (Fuchs) 2022-06-15 21:25:06 UTC
Created attachment 149762 [details]
screenshot of the issue

SUMMARY
The present window effect uses the wrong icon, e.g. if there is a plasma provides icon (used for the systray) it uses that instead of the coloured application icon it uses in the window title / task manager.

STEPS TO REPRODUCE
1. Open an app with a plasma icon  (e.g. konversation or cantata)
2. Open present window effect

OBSERVED RESULT
The monochrome icon meant for systray etc. is used

EXPECTED RESULT
The regular app icon is used

Operating System: Fedora Linux 36
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3
Kernel Version: 5.17.13-300.fc36.x86_64 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2
Comment 1 Christian (Fuchs) 2022-06-15 22:27:08 UTC
Additional note: 

this could be fixed by adding

usesPlasmaTheme: false

to the Plasma.IconItem that is used in that effect, but it seems that the qml sources for it are a bit spread across various places, so I didn't find it with a quick search.
Comment 2 Christian (Fuchs) 2022-06-15 22:35:13 UTC
Oh, nevermind,  the fix is: 

--- WindowHeap.qml      2022-06-16 00:33:35.627845270 +0200
+++ WindowHeapOrig.qml  2022-06-16 00:34:06.419713139 +0200
@@ -235,7 +235,6 @@
 
                 PlasmaCore.IconItem {
                     id: icon
+                   usesPlasmaTheme: false 
                     width: PlasmaCore.Units.iconSizes.large
                     height: width
                     source: thumb.client.icon

This. Some developer who knows where that file actually comes from repo-wise please fix it, thanks :)
Comment 3 Bug Janitor Service 2022-06-16 13:21:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2531
Comment 4 Vlad Zahorodnii 2022-06-16 14:11:17 UTC
Git commit c61f0ad158a538da84873269e2ce9ec5c1572474 by Vlad Zahorodnii, on behalf of Marco Martin.
Committed on 16/06/2022 at 13:55.
Pushed by vladz into branch 'master'.

Don't use  the plasma theme for icons in overview

don't attempt to use icons meant for the systray

M  +1    -0    src/effects/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/commit/c61f0ad158a538da84873269e2ce9ec5c1572474
Comment 5 Nate Graham 2022-06-16 14:17:33 UTC
Git commit fd5ee499d200f3a5debc19532626fece79c1a9d5 by Nate Graham, on behalf of Marco Martin.
Committed on 16/06/2022 at 14:17.
Pushed by ngraham into branch 'Plasma/5.25'.

Don't use  the plasma theme for icons in overview

don't attempt to use icons meant for the systray


(cherry picked from commit c61f0ad158a538da84873269e2ce9ec5c1572474)

M  +1    -0    src/effects/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/commit/fd5ee499d200f3a5debc19532626fece79c1a9d5
Comment 6 Christian (Fuchs) 2022-07-13 22:24:50 UTC
Aaaaaaaand it was broken again. 

https://invent.kde.org/plasma/kwin/-/commit/cd02c60f4608baed3533fe824a1f15c6b43d30ea  

most likely, needs


--- WindowHeapDelegate.qml.orig 2022-07-14 00:23:34.460080954 +0200
+++ WindowHeapDelegate.qml      2022-07-14 00:23:56.930935519 +0200
@@ -153,6 +153,7 @@
 
     PlasmaCore.IconItem {
         id: icon
+        usesPlasmaTheme: false 
         width: PlasmaCore.Units.iconSizes.large
         height: width
         source: thumb.client.icon
Comment 7 Bug Janitor Service 2022-07-13 22:58:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2654
Comment 8 Vlad Zahorodnii 2022-07-14 08:49:36 UTC
Git commit 1527a0cf13ec92e0185edf3b94b6211480769200 by Vlad Zahorodnii, on behalf of Bharadwaj Raju.
Committed on 14/07/2022 at 08:01.
Pushed by vladz into branch 'master'.

Don't use Plasma-themed icons in Present Windows

M  +1    -0    src/effects/private/qml/WindowHeapDelegate.qml

https://invent.kde.org/plasma/kwin/commit/1527a0cf13ec92e0185edf3b94b6211480769200
Comment 9 Vlad Zahorodnii 2022-07-14 09:10:00 UTC
Git commit f32e17313c657b711c972051d594548a578b46cf by Vlad Zahorodnii, on behalf of Bharadwaj Raju.
Committed on 14/07/2022 at 09:09.
Pushed by vladz into branch 'Plasma/5.25'.

Don't use Plasma-themed icons in Present Windows


(cherry picked from commit 1527a0cf13ec92e0185edf3b94b6211480769200)

M  +1    -0    src/effects/private/qml/WindowHeapDelegate.qml

https://invent.kde.org/plasma/kwin/commit/f32e17313c657b711c972051d594548a578b46cf