|
From: <eli...@us...> - 2006-10-24 10:43:58
|
Revision: 2602
http://svn.sourceforge.net/java-game-lib/?rev=2602&view=rev
Author: elias_naur
Date: 2006-10-24 03:43:52 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
Linux: Moved warp Atom from LinuxDisplay to LinuxMouse
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 10:39:14 UTC (rev 2601)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-24 10:43:52 UTC (rev 2602)
@@ -89,7 +89,6 @@
private int current_displaymode_extension = NONE;
/** Atom used for the pointer warp messages */
- private long warp_atom;
private long delete_atom;
private PeerInfo peer_info;
@@ -461,10 +460,6 @@
}
private static native void nSwitchDisplayMode(long display, int screen, int extension, DisplayMode mode) throws LWJGLException;
- static long getWarpAtom() throws LWJGLException {
- return internAtom("_LWJGL", false);
- }
-
private static long internAtom(String atom_name, boolean only_if_exists) throws LWJGLException {
incDisplay();
try {
@@ -473,7 +468,7 @@
decDisplay();
}
}
- private static native long nInternAtom(long display, String atom_name, boolean only_if_exists);
+ static native long nInternAtom(long display, String atom_name, boolean only_if_exists);
public void resetDisplayMode() {
lockAWT();
@@ -555,7 +550,6 @@
public DisplayMode init() throws LWJGLException {
lockAWT();
try {
- warp_atom = getWarpAtom();
delete_atom = internAtom("WM_DELETE_WINDOW", false);
current_displaymode_extension = getBestDisplayModeExtension();
if (current_displaymode_extension == NONE)
@@ -709,10 +703,10 @@
return mouse.getButtonCount();
}
- public void createMouse() {
+ public void createMouse() throws LWJGLException {
lockAWT();
try {
- mouse = new LinuxMouse(getDisplay(), getWindow(), warp_atom);
+ mouse = new LinuxMouse(getDisplay(), getWindow());
} finally {
unlockAWT();
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:39:14 UTC (rev 2601)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java 2006-10-24 10:43:52 UTC (rev 2602)
@@ -40,6 +40,7 @@
import java.nio.CharBuffer;
import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
import org.lwjgl.input.Mouse;
import java.nio.charset.CharsetDecoder;
@@ -76,10 +77,10 @@
private EventQueue event_queue;
private long last_event_nanos;
- public LinuxMouse(long display, long window, long warp_atom) {
+ public LinuxMouse(long display, long window) throws LWJGLException {
this.display = display;
this.window = window;
- this.warp_atom = warp_atom;
+ this.warp_atom = LinuxDisplay.nInternAtom(display, "_LWJGL", false);
reset();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|