[FIXED] Icon alpha on Linux

Started by Elviz, May 06, 2010, 23:15:45

Previous topic - Next topic

Elviz


  • Ubuntu 10.04 (lucid)
  • LWJGL 2.4.2

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).

mot

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?

kappa

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.

kappa

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 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.