alt+tab sometimes (5-10% of the time) freezes the display in Windows XP.

My game can alt+tab from the main menu without problem but when I alt+tab from the game with all threads running then in like 5-10% of the times I do alt+tab it freezes the display on my windows XP and I have to CTRL+ALT+DELETE to kill the java process.

The bug only happens when I run game in full screen mode and also it never happens when alt+tabbing back to the game always happens when I am alt tabbing out of the game to windows. Do I need to detect when windowdeactivated or windowstatechanged or whatever and switch to windowed mode before that alt+tab freezes the display or is that not possible?

Another different question which I have been asked from testers is why the game is not an application but a process as in when you CTRL+ALT+DELETE you do not see it as an application. This could not make any difference for this case or in general for any kind of issue anyway?

Is this in plain Java2D?

Cas :slight_smile:

Yes, a pure Swing application with NO openGL or anything.

Almost certainly a driver issue of some sort.

Cas :slight_smile:

I heard other ppl also had the same problem. So is it a bad driver for the graphic card or for the display and is there no way for me to work around it?

If it is correct what you are saying then I should thank you very much because else I would probably spend alot of time (which I already have) bumping my head against a wall if I think it is the Java code fault.

So, is there no way to see that alt+tab coming and quickly set the full screen off before the alt+tab comes into effect (also tried it but never go it to work)?

Alt tab is unfortunately handled by the OS, and just on top of that, the native AWT code - I don’t think there’s any easy way around it.
Just out of interest - does it happen with any LWJGL apps? (Say, Titan Attacks for example). That’d pretty much make it a dead cert for being dicky drivers.

Cas :slight_smile:

What java version are you using? There were a bunch of full-screen-related improvements
in Java 6. See if you can reproduce the issue on Java 6.

Also, what video board do you have, and on what OS?

Dmitri