From dd527308f9129c705d82e6421e4822ba1a48abb9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 5 Jan 2014 18:23:06 +0100 Subject: Bug 935: NEWT PointerIcon/Visibility: Perform JAWTWindow's OffscreenLayerSurface PointerIcon/Visibility tasks async on AWT-EDT setCursor(..) and hideCursor(..) must happen on the AWT-EDT w/o blocking, otherwise we may deadlock the NEWT-EDT. --- src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nativewindow/classes/jogamp') diff --git a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java index 31de84137..b690aff4d 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java +++ b/src/nativewindow/classes/jogamp/nativewindow/awt/AWTMisc.java @@ -177,7 +177,7 @@ public class AWTMisc { static final Cursor nulCursor; static { final Toolkit toolkit = Toolkit.getDefaultToolkit(); - BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR); + final BufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR); nulCursor = toolkit.createCustomCursor(img, new Point(0,0), "nullCursor"); } @@ -194,7 +194,7 @@ public class AWTMisc { } private static synchronized Cursor createAWTCursor(IOUtil.ClassResources resources, Point hotSpot) throws IOException { final URLConnection urlConn = resources.resolve(0); - BufferedImage img = ImageIO.read(urlConn.getInputStream()); + final BufferedImage img = ImageIO.read(urlConn.getInputStream()); final Toolkit toolkit = Toolkit.getDefaultToolkit(); return toolkit.createCustomCursor(img, hotSpot, resources.resourcePaths[0]); -- cgit v1.2.3