Linux: Fixed resetDisplayMode in case XRandr is used and the first reported mode is not the initial mode

This commit is contained in:
Elias Naur 2006-01-31 12:48:46 +00:00
parent 3b8b751935
commit bf84c8b361
1 changed files with 8 additions and 3 deletions

View File

@ -389,11 +389,16 @@ final class LinuxDisplay implements DisplayImplementation {
} }
private static DisplayMode getCurrentXRandrMode() throws LWJGLException { private static DisplayMode getCurrentXRandrMode() throws LWJGLException {
incDisplay(); lockAWT();
try { try {
return nGetCurrentXRandrMode(); incDisplay();
try {
return nGetCurrentXRandrMode();
} finally {
decDisplay();
}
} finally { } finally {
decDisplay(); unlockAWT();
} }
} }