The mouse Y-coordinate appears to be off when retrieving it with Mouse.getEventY() in windowed mode, at least on Windows (XP). This seems to occur when the window is (slightly) higher than the screen resolution minus the height of the task bar. The problem can be reproduced with the code below. When you run this and click right below the top of the window you'll see the Y-coordinate is wrong (should be near 3000). It seems like it's limited somehow by the actual screen height minus that of the task bar.
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.PixelFormat;
public class App
{
public static void main( String[] args ) throws LWJGLException
{
Display.setTitle("MouseProb");
Display.setFullscreen(false);
Display.setDisplayMode(new DisplayMode(600, 3000));
Display.setInitialBackground(0, 0, 0);
PixelFormat pixelFormat = new PixelFormat(24, 8, 16, 0, 0); // bpp, alfa, dep, sten, fsaa
Display.create(pixelFormat);
for(;;)
{
// Draw stuff here
Display.update(false);
Display.sync(30);
Display.processMessages();
if(Display.isCloseRequested()) break;
while(Mouse.next())
{
if(Mouse.getEventButton() >= 0 && Mouse.getEventButtonState())
{
int x = Mouse.getEventX();
int y = Mouse.getEventY();
System.out.println("Mouse clicked at X=" + x + " Y=" + y);
}
}
}
Display.destroy();
}
}