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:
parent
632fcbfeaa
commit
dbe9667c3d
|
@ -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*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue