LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: Elviz on May 06, 2010, 23:15:45

Title: [FIXED] Icon alpha on Linux
Post by: Elviz on May 06, 2010, 23:15:45

Even when the byte buffers passed to Display.setIcon contain proper alpha data, the displayed icon(s) will only have on/off transparency. This is especially visible when using the Alt+Tab window switcher. I noticed that the icons of other applications (i.e., non-LWJGL ones) don't have this problem, so apparently there's some level of support for 8-bit transparency that LWJGL doesn't currently make use of.

A similar limitation in the Windows port was removed some time ago (r3227).
Title: Re: Icon alpha on Linux
Post by: mot on May 06, 2010, 23:26:28
Another thing related to program icon -- when setting a custom icon there is often a delay before the icon is changed from the default LWJGL one. I guess this is because the system is busy loading the rest of the program and processing; although Display.setIcon() is the first thing I call after Display.setDisplayMode(), sometimes the default LWJGL icon is visible for a second or two.

Would it be possible to set the icon before opening the display?
Title: Re: Icon alpha on Linux
Post by: kappa on May 07, 2010, 18:42:30
Quote from: Elviz on May 06, 2010, 23:15:45
A similar limitation in the Windows port was removed some time ago (r3227).

someone needed the feature so they provided a patch for windows.

I'm sure if someone provides a patch for this feature it'd be added.
Title: Re: [RFE] Icon alpha on Linux
Post by: kappa on November 09, 2013, 19:58:44
This should be implemented now (was oldest RFE/Bug post :)).

Implemented 8 bit icon transparency support on Linux.

The LWJGL code was using an ancient/legacy API (XCreatePixmap) to set the icon which only supports 1 bit transparency. Removed legacy method and associated code.

Now using the modern _NET_WM_ICON (http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idp6344560) method from the latest EWMH spec (freedesktop.org) to set the icons.

Icons should now also be visible on modern Linux WM's where they previously were not showing, e.g. KDE no longer supports the old way of setting icons with XCreatePixmap.

Should be available in the next nightly builds of LWJGL.