Mouse.setGrabbed trouble

Started by growlieRa, April 20, 2006, 07:40:31

Previous topic - Next topic

growlieRa

Hi, i'm having issues with Mouse.setGrabbed.  When I call it from my main thread, the one that does Display.update() and Display.sync, it works fine. When I call Mouse.setGrabbed(true) from a different thread, it acts like the mouse is in fact grabbed(can't click on window buttons), but the cursor is drawn. Obviously there are work-arounds, but is this the intended behavior?
Using windows xp btw.

Matzon

The intended behaviour is that lwjgl is single threaded. If you are using it in a multithreaded environment results are undefined.

So best way to solve this, is to make sure that the calling thread is the one that created the display.

growlieRa

That clears things up, thank you for the quick response.