|
From: <eli...@us...> - 2006-11-24 15:03:07
|
Revision: 2679
http://svn.sourceforge.net/java-game-lib/?rev=2679&view=rev
Author: elias_naur
Date: 2006-11-24 07:03:05 -0800 (Fri, 24 Nov 2006)
Log Message:
-----------
Compile fix
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2006-11-24 14:53:01 UTC (rev 2678)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2006-11-24 15:03:05 UTC (rev 2679)
@@ -138,8 +138,6 @@
LWJGLUtil.log("Failed to query pointer location: " + e.getCause());
} catch (NoSuchMethodException e) {
LWJGLUtil.log("Failed to query pointer location: " + e);
- } catch (IllegalAccessException e) {
- LWJGLUtil.log("Failed to query pointer location: " + e);
} catch (ClassNotFoundException e) {
LWJGLUtil.log("Failed to query pointer location: " + e);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2007-01-02 10:55:46
|
Revision: 2709
http://svn.sourceforge.net/java-game-lib/?rev=2709&view=rev
Author: elias_naur
Date: 2007-01-02 02:55:44 -0800 (Tue, 02 Jan 2007)
Log Message:
-----------
Mac OS X: Add support for fake cursor animation
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2006-12-26 09:19:40 UTC (rev 2708)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2007-01-02 10:55:44 UTC (rev 2709)
@@ -77,7 +77,7 @@
if (LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_MACOSX || LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 4)) {
int cursor_colors = Toolkit.getDefaultToolkit().getMaximumCursorColors();
boolean supported = cursor_colors >= Short.MAX_VALUE && getMaxCursorSize() > 0;
- int caps = supported ? org.lwjgl.input.Cursor.CURSOR_8_BIT_ALPHA | org.lwjgl.input.Cursor.CURSOR_ONE_BIT_TRANSPARENCY: 0;
+ int caps = supported ? org.lwjgl.input.Cursor.CURSOR_8_BIT_ALPHA | org.lwjgl.input.Cursor.CURSOR_ONE_BIT_TRANSPARENCY: 0 | org.lwjgl.input.Cursor.CURSOR_ANIMATION;
return caps;
} else {
/* Return no capability in Mac OS X 10.3 and earlier , as there are two unsolved bugs (both reported to apple along with
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-10 20:15:52
|
Revision: 3001
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3001&view=rev
Author: elias_naur
Date: 2008-04-10 13:14:15 -0700 (Thu, 10 Apr 2008)
Log Message:
-----------
Mac OS X: Fixed potential NPE in AWTUtil.getPointerLocation
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2008-04-09 23:40:18 UTC (rev 3000)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2008-04-10 20:14:15 UTC (rev 3001)
@@ -39,6 +39,7 @@
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.GraphicsDevice;
+import java.awt.GraphicsConfiguration;
import java.awt.IllegalComponentStateException;
import java.awt.Point;
import java.awt.Robot;
@@ -115,12 +116,15 @@
final Method getLocation_method = PointerInfo_class.getMethod("getLocation", null);
return (Point)AccessController.doPrivileged(new PrivilegedExceptionAction() {
public final Object run() throws Exception {
- Object pointer_info = getPointerInfo_method.invoke(null, null);
- GraphicsDevice device = (GraphicsDevice)getDevice_method.invoke(pointer_info, null);
- if (device == component.getGraphicsConfiguration().getDevice()) {
- return (Point)getLocation_method.invoke(pointer_info, null);
- } else
- return null;
+ GraphicsConfiguration config = component.getGraphicsConfiguration();
+ if (config != null) {
+ Object pointer_info = getPointerInfo_method.invoke(null, null);
+ GraphicsDevice device = (GraphicsDevice)getDevice_method.invoke(pointer_info, null);
+ if (device == config.getDevice()) {
+ return (Point)getLocation_method.invoke(pointer_info, null);
+ }
+ }
+ return null;
}
});
} catch (PrivilegedActionException e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-30 12:46:59
|
Revision: 3051
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3051&view=rev
Author: elias_naur
Date: 2008-04-30 05:46:54 -0700 (Wed, 30 Apr 2008)
Log Message:
-----------
Don't use reflection for AWTUtil.getPointerLocation
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2008-04-29 18:56:46 UTC (rev 3050)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java 2008-04-30 12:46:54 UTC (rev 3051)
@@ -42,6 +42,8 @@
import java.awt.GraphicsConfiguration;
import java.awt.IllegalComponentStateException;
import java.awt.Point;
+import java.awt.MouseInfo;
+import java.awt.PointerInfo;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
@@ -109,30 +111,21 @@
*/
private static Point getPointerLocation(final Component component) {
try {
- final Class MouseInfo_class = Class.forName("java.awt.MouseInfo");
- final Method getPointerInfo_method = MouseInfo_class.getMethod("getPointerInfo", null);
- final Class PointerInfo_class = Class.forName("java.awt.PointerInfo");
- final Method getDevice_method = PointerInfo_class.getMethod("getDevice", null);
- final Method getLocation_method = PointerInfo_class.getMethod("getLocation", null);
- return (Point)AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public final Object run() throws Exception {
- GraphicsConfiguration config = component.getGraphicsConfiguration();
- if (config != null) {
- Object pointer_info = getPointerInfo_method.invoke(null, null);
- GraphicsDevice device = (GraphicsDevice)getDevice_method.invoke(pointer_info, null);
- if (device == config.getDevice()) {
- return (Point)getLocation_method.invoke(pointer_info, null);
- }
+ final GraphicsConfiguration config = component.getGraphicsConfiguration();
+ if (config != null) {
+ PointerInfo pointer_info = (PointerInfo)AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public final Object run() throws Exception {
+ return MouseInfo.getPointerInfo();
}
- return null;
+ });
+ GraphicsDevice device = pointer_info.getDevice();
+ if (device == config.getDevice()) {
+ return pointer_info.getLocation();
}
- });
+ return null;
+ }
} catch (PrivilegedActionException e) {
LWJGLUtil.log("Failed to query pointer location: " + e.getCause());
- } catch (NoSuchMethodException e) {
- LWJGLUtil.log("Failed to query pointer location: " + e);
- } catch (ClassNotFoundException e) {
- LWJGLUtil.log("Failed to query pointer location: " + e);
}
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|