Added a Thread.yield() to applets tests that repaint() last in paintGL() to help input responsiveness on linux. Thanks to Kappa for debugging and finding the workaround.

This commit is contained in:
Elias Naur 2007-11-09 05:11:29 +00:00
parent 632fcbfeaa
commit dbe9667c3d
2 changed files with 6 additions and 2 deletions

View File

@ -121,8 +121,10 @@ public class OpenGL extends AWTGLCanvas implements Test {
}
try {
swapBuffers();
if (isVisible())
if (isVisible()) {
Thread.yield(); // Helps input responsiveness on linux
repaint();
}
} catch (Exception e) {/*OK*/
}
}

View File

@ -66,8 +66,10 @@ public class Speed extends AWTGLCanvas implements Test {
try {
swapBuffers();
if (isVisible())
if (isVisible()) {
Thread.yield(); // Helps input responsiveness on linux
repaint();
}
} catch (Exception e) {/*OK*/
}
if (startTime > System.currentTimeMillis()) {