Mouse.setGrabbed() behaviour

Started by kevglass, September 10, 2006, 02:42:17

Previous topic - Next topic

kevglass

If you setGrabbed(true) as a response to a mouse click at the moment the release of button isn't registered correctly on WinXP (not tried others). This means if you try to swtich to another program having grabbed the mouse and released it based on a mouse click then you can't

public void gameLoop() {
     while (Mouse.next()) {
           if (Mouse.getEventButton() == 1) {
                 Mouse.setGrabbed(Mouse.getEventButtonState());
           }
     }
}


I'm actually using JME at the moment, but I've just tested this behaviour using the space invaders demo as a starting point. If you do setGrabbed() as response to a key press the issue doesn't show up.

Seems almost like the mouse press/release is lost due to the grab.

This is in Beta3.

Kev