From b09c6cf335ec0bac4b648c19645e35935cccb0b0 Mon Sep 17 00:00:00 2001 From: kappa1 Date: Tue, 11 Oct 2011 22:39:32 +0000 Subject: [PATCH] minor tweak to the order in which CALayer support is detected. --- src/java/org/lwjgl/opengl/AWTSurfaceLock.java | 4 ++-- src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/lwjgl/opengl/AWTSurfaceLock.java b/src/java/org/lwjgl/opengl/AWTSurfaceLock.java index 5a3730e6..bf9bae6e 100644 --- a/src/java/org/lwjgl/opengl/AWTSurfaceLock.java +++ b/src/java/org/lwjgl/opengl/AWTSurfaceLock.java @@ -80,8 +80,8 @@ final class AWTSurfaceLock { // It is only needed on first call, so we avoid it on all subsequent calls // due to performance.. - // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen - final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen(); + // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas + final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas; if (firstLockSucceeded) return lockAndInitHandle(lock_buffer, component, allowCALayer); diff --git a/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java b/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java index 824a112b..e9d506c1 100644 --- a/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java +++ b/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java @@ -50,8 +50,8 @@ abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo { } protected void initHandle(Canvas component) throws LWJGLException { - // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen - final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen(); + // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas + final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas; nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer); }