From fbb490bb3aee9489d01d7beded8ac7199ba6a721 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Wed, 16 Jan 2013 19:02:09 +0000 Subject: [PATCH] Reenable the AWT Robot for CALayer mode --- src/java/org/lwjgl/opengl/MacOSXDisplay.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/opengl/MacOSXDisplay.java b/src/java/org/lwjgl/opengl/MacOSXDisplay.java index 2df4d04e..c024f236 100644 --- a/src/java/org/lwjgl/opengl/MacOSXDisplay.java +++ b/src/java/org/lwjgl/opengl/MacOSXDisplay.java @@ -67,7 +67,7 @@ final class MacOSXDisplay implements DisplayImplementation { private static final int PBUFFER_HANDLE_SIZE = 24; private static final int GAMMA_LENGTH = 256; - private MacOSXCanvasListener canvas_listener; + //private MacOSXCanvasListener canvas_listener; private Canvas canvas; private Robot robot; private MacOSXMouseEventQueue mouse_queue; @@ -148,6 +148,10 @@ final class MacOSXDisplay implements DisplayImplementation { native_mode = nIsNativeMode(peer_handle); + if (!native_mode) { + robot = AWTUtil.createRobot(canvas); + } + } catch (LWJGLException e) { destroyWindow(); throw e; @@ -175,6 +179,7 @@ final class MacOSXDisplay implements DisplayImplementation { ByteBuffer peer_handle = peer_info.getHandle(); nDestroyCALayer(peer_handle); } + robot = null; } nDestroyWindow(window);