Hello Guest

[FIXED] Icon alpha on Linux

  • 3 Replies
  • 5603 Views
*

Offline Elviz

  • *
  • 25
[FIXED] Icon alpha on Linux
« on: May 06, 2010, 23:15:45 »
  • 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).
« Last Edit: November 09, 2013, 19:58:58 by kappa »

*

Offline mot

  • **
  • 57
    • http://www.catnapgames.com
Re: Icon alpha on Linux
« Reply #1 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?
Tom Andrle - Catnap Games - http://www.catnapgames.com

*

Offline kappa

  • *****
  • 1314
Re: Icon alpha on Linux
« Reply #2 on: May 07, 2010, 18:42:30 »
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.

*

Offline kappa

  • *****
  • 1314
Re: [RFE] Icon alpha on Linux
« Reply #3 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 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.
« Last Edit: November 10, 2013, 00:26:17 by kappa »