Linux: Remove 32x32 icons size check, since other sizes seem to work alright. Document the fact that Display.setIcon use the icons from the icon array in order of decreasing preference

This commit is contained in:
Elias Naur 2006-07-22 21:30:31 +00:00
parent 086c4de5a1
commit 4c9edffc85
2 changed files with 5 additions and 7 deletions

View File

@ -273,7 +273,7 @@ public final class Display {
if(cached_icons != null) {
setIcon(cached_icons);
} else {
setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon16x16, LWJGLUtil.LWJGLIcon32x32 });
setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon32x32, LWJGLUtil.LWJGLIcon16x16 });
}
}
@ -879,7 +879,7 @@ public final class Display {
* of recreating the icons when you go back and forth fullscreen mode. You therefore only need to
* set the icon once per instance.
*
* @param icons Array of icons in RGBA mode
* @param icons Array of icons in RGBA mode. Pass the icons in order of preference.
* @return number of icons used, or 0 if display hasn't been created
*/
public static int setIcon(ByteBuffer[] icons) {

View File

@ -949,11 +949,9 @@ final class LinuxDisplay implements DisplayImplementation {
for (int i=0;i<icons.length;i++) {
int size = icons[i].limit() / 4;
int dimension = (int)Math.sqrt(size);
if (dimension == 32) {
ByteBuffer icon = convertIcon(icons[i], dimension, dimension);
nSetWindowIcon(icon, icon.capacity(), dimension, dimension);
return 1;
}
ByteBuffer icon = convertIcon(icons[i], dimension, dimension);
nSetWindowIcon(icon, icon.capacity(), dimension, dimension);
return 1;
}
return 0;
} finally {