I use mouse-drag to rotate the camera in my application, and noticed that sometimes the mouse would get "stuck down" if I clicked instead of dragging.
I tracked this down to the mouse event code losing the "mouse button release" event when calling Mouse.setGrabbed(true), and so never calling Mouse.setGrabbed(false).
This occurs on linux 64-bit system, across both Java 6 32-bit and Java 7 64-bit, and both LWJGL 2.7.1 and 2.8.0. A short test case follows:
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
public class TestLWJGL {
public static void main(String[] args) throws Exception {
Display.create();
while (!Display.isCloseRequested()) {
Display.update();
while (Mouse.next()) {
if (Mouse.getEventButton() == 0) {
Mouse.setGrabbed(Mouse.getEventButtonState());
}
}
}
}
}
When run, it should hide the mouse pointer (grab) when the mouse button is pressed, and show the pointer again when it is released (ungrab). It does this with sufficient interval between press and release, but fails to do so if clicked (press and release immediately).
I have worked around this by not grabbing the mouse.