Bug 65754 - Alt+Tab Switching Icon Has Low Resolution and Lacks Transparency because _NET_WM_ICON is set to a 48x48 raster image
Summary: Alt+Tab Switching Icon Has Low Resolution and Lacks Transparency because _NET...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: KDE, KF5 Desktop-Integration
  Show dependency treegraph
 
Reported: 2013-06-14 13:43 UTC by Alexi
Modified: 2019-05-12 21:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparison of LibreOffice Alt+Tab Icon to Firefox (29.79 KB, image/png)
2013-06-14 13:43 UTC, Alexi
Details
Ugly Icons in KDE Plasma Large Icons Task Switcher (1.33 MB, image/png)
2018-02-13 18:18 UTC, Nate Graham
Details
Still a problem in today's daily build (229.38 KB, image/png)
2018-06-10 18:37 UTC, Nate Graham
Details
Screenshot when using gen/x11 VCL plugin (91.76 KB, image/png)
2019-05-10 06:03 UTC, Michael Weghorn
Details
Screenshot when using kde5 VCL plugin (94.11 KB, image/png)
2019-05-10 06:03 UTC, Michael Weghorn
Details
Small sample Qt application that shows the same behaviour (260 bytes, text/x-c++src)
2019-05-10 06:27 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexi 2013-06-14 13:43:53 UTC
Created attachment 80809 [details]
Comparison of LibreOffice Alt+Tab Icon to Firefox

The Icon that is displayed when switching between applications using the Alt+Tab key combination has a very low-resolution and lacks proper background transparency.
Comment 1 Martin Geier 2014-01-04 15:17:55 UTC
This problem is in xfce enviroment too. 

In xfce, icons showed in alt+tab dialog are loaded from _NET_WM_ICON property. You can get this propery by "xprop -id $XID _NET_WM_ICON" and XID from xwininf app.

In my case Xubuntu 13.10, LibreOffice 4.1.3.2, I get only 16x16 and 24x24 icons.

For Impress:
xprop -id 0x3c00059 _NET_WM_ICON
_NET_WM_ICON(CARDINAL) = 	Icon (26 x 26):
	                          
	                          
	    ░▒▒▒▒▒▒▒▒▒░  ▒▒▒▒░    
	    ▒         ▒░ ░▒▒▒▒    
	    ▒          ▒░ ░▒▒▒    
	    ▒           ▒░ ░▒▒    
	    ▒            ▒░ ░▒    
	    ▒             ▒░      
	    ▒              ▒░     
	    ▒               ▒░    
	    ▒   ░▒▒▒▒▒▒▒▒░   ▒    
	    ▒  ▒░        ░▒  ▒    
	    ▒  ▒  ░▒▒▒▒░  ▒  ▒    
	    ▒  ▒          ▒  ▒    
	    ▒  ▒  ▒ ▒▒▒▒  ▒  ▒    
	    ▒  ▒          ▒  ▒    
	    ▒  ▒ ░▒░▒▒▒▒░ ▒  ▒    
	    ▒░ ▒░░ ░    ░░▒ ░▒    
	    ▒░ ░▒▒▒▒▒▒▒▒▒▒░ ░▒    
	    ▒░              ░▒    
	    ▒░              ░▒    
	    ▒░░░░░░░░░░░░░░░░▒    
	    ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░    
	                          
	                          
	                          

	Icon (16 x 16):
	 ░▒▒▒▒▒▒▒  ▒▒▒▒ 
	 ▒      ░▒  ▒▒▒ 
	 ▒       ░▒  ▒▒ 
	 ▒        ░▒  ▒ 
	 ▒         ░▒   
	 ▒          ░▒  
	 ▒  ▒▒▒▒▒▒▒▒ ░▒ 
	 ▒  ▒      ▒  ▒ 
	 ▒  ▒ ▒ ▒▒░▒  ▒ 
	 ▒  ▒      ▒  ▒ 
	 ▓  ▒ ▓ ▓▓░▓  ▓ 
	 ▓  ▓      ▓  ▓ 
	 ▓░ ▓▓▓▓▓▓▓▓ ░▓ 
	 ▓░          ░▓ 
	 ▓░░░░░░░░░░░░▓ 
	 ▒▓▓▓▓▓▓▓▓▓▓▓▓▒
Comment 2 Adolfo Jayme Barrientos 2014-09-01 03:20:30 UTC
Right now you’ll need to use your distro’s LibreOffice instead of the official TDF packages to get proper integration with your icon theme.
Comment 3 Nate Graham 2017-10-15 21:50:12 UTC
Even using a distro package (e.g. libreoffice-kde) doesn't help in a KDE environment, since under X11, KDE's window manager KWin always honors _NET_WM_ICON instead of using the themed icons from the .desktop file. And in vcl/unx/generic/window/salframe.cxx, LibreOffice sets _NET_WM_ICON to be a really ugly, low-resolution icon.

It's particularly bad in Plasma, as the internal Breeze theme icon is just wrong, too: https://bugsfiles.kde.org/attachment.cgi?id=105866 See https://bugs.kde.org/show_bug.cgi?id=380508, particularly the picture: https://bugsfiles.kde.org/attachment.cgi?id=105866

But regardless, this is 2017; _NET_WM_ICON shouldn't be set to a 48x48 raster image. We can do better than that.
Comment 4 andreas_k 2017-11-18 16:14:56 UTC
any idea how to fix this bug?
Comment 5 Nate Graham 2018-02-13 18:18:33 UTC
Created attachment 139874 [details]
Ugly Icons in KDE Plasma Large Icons Task Switcher

Attaching a picture of how it looks in the KDE Plasma Large Icons Task Switcher.
Comment 6 Nate Graham 2018-04-26 15:37:50 UTC
Buovjaga, could we get this bumped up in the priority list? It's a fairly impatctful visual papercut in KDE Plasma for users of the popular Large Icons task switcher. See the attached screenshots.
Comment 7 Buovjaga 2018-04-26 16:33:21 UTC
Eh, OK, although I've wanted to keep at least some relative meaning to the levels of priority and severity.
Comment 8 Nate Graham 2018-04-26 17:58:51 UTC
Thanks, and sorry to be a pain in the butt!
Comment 9 andreas_k 2018-06-10 18:23:06 UTC
LibreOffice use the mimetype icons from LibreOffice for switch windows or the taskmanager.

The NEW LibreOffice icons are available in 16,22,24,32,48,64,128,256px size so they should be shown.

Please check again with a master build https://dev-builds.libreoffice.org/daily/master/
Comment 10 Nate Graham 2018-06-10 18:37:30 UTC
Created attachment 142638 [details]
Still a problem in today's daily build

Andreas, the problem isn't a lack of high resolution icons. The problem is that the _NET_WM_ICON window property isn't set properly, so they don't get used. I found the problem in vcl/unx/generic/window/salframe.cxx.

I can confirm that the problem remains with today's daily build. See the attached screenshot.
Comment 11 andreas_k 2019-04-24 20:30:09 UTC
can someone have a look how has experience with kde/qt desktop integration.

thanks
Comment 12 Michael Weghorn 2019-05-10 06:03:14 UTC
Created attachment 151284 [details]
Screenshot when using gen/x11 VCL plugin
Comment 13 Michael Weghorn 2019-05-10 06:03:45 UTC
Created attachment 151285 [details]
Screenshot when using kde5 VCL plugin
Comment 14 Michael Weghorn 2019-05-10 06:27:33 UTC
Created attachment 151286 [details]
Small sample Qt application that shows the same behaviour
Comment 15 Michael Weghorn 2019-05-10 06:34:22 UTC
I just tried to reproduce on Debian testing running Plasma with the Breeze theme (plasma-desktop package at version 4:5.14.5.1-1) and am unable to do so with the kde5 or gtk3 VCL plugins. Current LibreOffice master build used (as of commit 425a570a114d9a087e5320f071604f64d43fcec1)

[To actually set up the icon-only task switcher, I had to: go to "System Settings" -> "Task Switcher", click the star icon to open the "Get Hot New Stuff" system settings module and install the "MediumRoundedDark" windows switcher; then select "Large Icons".]

What Nate says about those icons being set in 'vcl/unx/generic/window/salframe.cxx' seems correct, **but** this is only relevant if the gen/x11 VCL plugin is used, which is not really what want to use anyway if you want a modern UI. :) If I use that VCL plugin (start LibreOffice with 'SAL_USE_VCLPLUGIN=gen ./instdir/program/soffice --writer', I can reproduce the issue, s. screenshot in attachment 151284 [details].


However, if I use the gtk3 (SAL_USE_VCLPLUGIN=gtk3) or kde5 VCL plugin (default on KDE Plasma), the icon looks nice, s. attachment 151285 [details]. 
As far as I can see, the icons are set in 'Qt5Frame::setIcon' using 'QWindow::setIcon' and it uses the icon from the icon theme [1], which for the writer case would be:

    QIcon aIcon = QIcon::fromTheme("libreoffice-writer");

The corresponding icon is located at '/usr/share/icons/breeze/apps/48/libreoffice-writer.svg'. If I open that icon using e.g. Inkscape, it looks the same as the icon in the task switcher in my screenshot. Since it's an SVG icon, there shouldn't be any issues with scaling etc.

The behaviour is the same as with the attached little sample program ( attachment 151286 [details] ).


@Nate, or somebody else of those who are affected:
Can you still reproduce this issue with a current master build of LibreOffice (available at  and co-installable as described at [3])?

If so:

1) Does it also happen with a clean user profile? (shouldn't play any role, but...)
2) What distro are you using?
3) What Plasma theme?
4) What happens when using the attached sample program (attachment 151286 [details]) instead of LibreOffice?
5) Can you attach an strace output?
6) Can you paste the version information from "Help" -> "About LibreOffice"?
7) Any other ideas what could be the reason?



[1] https://cgit.freedesktop.org/libreoffice/core/tree/vcl/qt5/Qt5Frame.cxx?id=c1bcdf9aa5d8ea99435906ffa9787232a909ff0f#n309
[2] https://dev-builds.libreoffice.org/daily/master/
[3] https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 16 Michael Weghorn 2019-05-10 06:37:30 UTC
(In reply to Michael Weghorn from comment #15)
> LibreOffice (available at  and co-installable as described at [3])?

That should have been: "available at [2]  and co-installable as described at [3]"
Comment 17 Michael Weghorn 2019-05-10 06:40:54 UTC
Looking again at the screenshot in comment 10, this one was still using the kde4 VCL plugin, which is no more on current master, so the hope is that the described problem is gone as well. :)
Can anybody confirm this?
Comment 18 Nate Graham 2019-05-12 21:56:17 UTC
Confirmed that the problem is fixed with the KDE5 VCL and version 6.2.3.2! I get the nice icon from the icon theme in my Large Icons task switcher now.

I'm using Manjaro with Plasma 5.15.5.