Window doesn't respond after context switch

Started by Tiamat, August 19, 2009, 19:39:37

Previous topic - Next topic

Tiamat

Hi,

I'm creating a display on the Main-Thread and then create a new thread for the gameloop. Prior to starting the gameloop thread, main releases the display context and the gameloop thread grabs the context just before entering the loop.

This worked just fine. However, now creating a Keyboard or a Mouse in either the Main- or the gameloop thread, causes the Window not to respond anymore. No keyboard, mouse or isCloseRequested events are processed anymore. If I click into the window a few times or drag it with the mouse, it gets a "[Not responding]" message in the title.

The only way to work around this, is to call the Display.create() in the gameloop thread and have no context switch at all.

Is there a bug in the context-switching or am I doing something wrong?
I wipe the silver bullet tears, and with every tear a dream. With every tear a dream.