From 65c180fa48eb75fd0c3667d2cd97e379e250f982 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 16 Jun 2008 18:31:43 +0000 Subject: [PATCH] Linux: Added sanity checking to LinuxDisplay.setIcon --- src/java/org/lwjgl/opengl/LinuxDisplay.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index 481a353e..0df8efda 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -1193,10 +1193,12 @@ final class LinuxDisplay implements DisplayImplementation { for (int i=0;i 0) { + ByteBuffer icon_rgb = convertIcon(icons[i], dimension, dimension); + ByteBuffer icon_mask = convertIconMask(icons[i], dimension, dimension); + nSetWindowIcon(getDisplay(), getWindow(), icon_rgb, icon_rgb.capacity(), icon_mask, icon_mask.capacity(), dimension, dimension); + return 1; + } } return 0; } finally {