SUMMARY When using a player such as mpv in fullscreen, it disables window previews in the task switcher (don't know why, and would definitely be interested to understand why - I just noticed GIMP shows the document we work on besides its own icon - it's still not the window preview anymore) When previews get disable, task switcher shows high quality icons. But for some software, the icon is blurry and shows a bad quality, despite having high quality material available. I don't know which size the task switcher is looking for, and at first I thought it was a bad quality conversion with Alacritty icon as, by looking into `/usr/share/icons/hicolor/` (I'm guessing this is where icons are picked from) I saw there was only a svg, svg that was able to be high quality whatever the size, but could end-up with a bad quality conversion to png. But then I noticed that Element was also affected. And element had a large choice of sizes available: ``` $ fd element /usr/share/icons/hicolor/ /usr/share/icons/hicolor/128x128/apps/io.element.Element.png /usr/share/icons/hicolor/16x16/apps/io.element.Element.png /usr/share/icons/hicolor/24x24/apps/io.element.Element.png /usr/share/icons/hicolor/256x256/apps/io.element.Element.png /usr/share/icons/hicolor/48x48/apps/io.element.Element.png /usr/share/icons/hicolor/512x512/apps/io.element.Element.png /usr/share/icons/hicolor/64x64/apps/io.element.Element.png /usr/share/icons/hicolor/96x96/apps/io.element.Element.png /usr/share/icons/hicolor/scalable/apps/io.element.Element.svg ``` See the screenshots I'll join STEPS TO REPRODUCE 1. Open affected software such as Element or Alacritty 2. Play a video with mpv in fullscreen mode so that previews get disabled 3. Use task switcher and see how these icons are blurry. OBSERVED RESULT Some icons are blurry in the task switcher when previews are off EXPECTED RESULT These icons shouldn't be blurry SOFTWARE/OS VERSIONS ArchLinux Linux/KDE Plasma: 5.27.0 (available in About System) I'm not seeing an "About System", where should it be looked for? KDE Plasma Version: KDE Frameworks Version: Qt Version:
Created attachment 156457 [details] Screenshot with Element blurry icon
Created attachment 156458 [details] Screenshot with Alacritty blurry icon
mpv disables compositing, so kwin stops providing previews and falls back to displaying icons. Electron based applications don't provide desktop file hints, so kwin uses whatever icons are provided in the X11 windows. Usually, those icons are low resolution and look blurry when upscaled. It can be fixed if the application provides _KDE_NET_WM_DESKTOP_FILE or _GTK_APPLICATION_ID properties.
(In reply to Vlad Zahorodnii from comment #3) > mpv disables compositing, so kwin stops providing previews and falls back to > displaying icons. > > Electron based applications don't provide desktop file hints, so kwin uses > whatever icons are provided in the X11 windows. Usually, those icons are low > resolution and look blurry when upscaled. It can be fixed if the application > provides _KDE_NET_WM_DESKTOP_FILE or _GTK_APPLICATION_ID properties. I don't know what are desktop file hints, but while Element is indeed an electron application, Alacritty isn't one. So, kwin isn't checking `/usr/share/icons/hicolor/` by itself at all? Shouldn't it? No idea about _KDE_NET_WM_DESKTOP_FILE or _GTK_APPLICATION_ID but it seems to be very DE-specific; I think the task switcher should be able to get the correct pictures by itself with generic locations, shouldn't it?
> I think the task switcher should be able to get the correct pictures by itself with generic locations, shouldn't it? kwin doesn't have enough information to do that, all it knows that there is this window with this geometry, caption, wm class, and (optionally pid), but that's not enough. libtaskmanager uses some heuristics, but we won't add them in kwin. The proper way would be to set either _KDE_NET_WM_DESKTOP_FILE or _GTK_APPLICATION_ID with the desktop file name. Then kwin read the desktop file and find the icon.
Then kwin can read*
Oka, I tried to lookup for information about these _KDE_NET_WM_DESKTOP_FILE or _GTK_APPLICATION_ID but couldn't find satisfactory enough ones. Are these supposed to be properties in the .desktop file? Is it something that you intend to have fixed by the distribution maintainers/packagers? Or the software developers themselves? For the latter I highly doubt some of these devs will bother managing the special case of every desktop environment/window manager/compositor, which is why I was looking for pretty standardized ways working for every environment: from the software I was running, not many of them were affected by such issues (at least for those I ran there, many are more casually launched).
Okay*