|
From: Elias N. <eli...@us...> - 2005-10-10 09:11:26
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24149/src/native/linux Modified Files: org_lwjgl_input_Mouse.c Log Message: Linux: Fix Mouse.setCursorPosition() Index: org_lwjgl_input_Mouse.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- org_lwjgl_input_Mouse.c 28 Apr 2005 09:57:45 -0000 1.36 +++ org_lwjgl_input_Mouse.c 10 Oct 2005 09:11:24 -0000 1.37 @@ -344,14 +344,7 @@ } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetCursorPosition(JNIEnv * env, jclass clazz, jint x, jint y) { - XWindowAttributes attributes; - if (!XGetWindowAttributes(getDisplay(), getCurrentWindow(), &attributes)) { - printfDebugJava(env, "XGetWindowAttributes failed"); - return; - } - int transformed_x = attributes.x + x; - int transformed_y = attributes.y + transformY(y); - XWarpPointer(getDisplay(), None, getCurrentWindow(), 0, 0, 0, 0, transformed_x, transformed_y); + XWarpPointer(getDisplay(), None, getCurrentWindow(), 0, 0, 0, 0, x, transformY(y)); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabMouse(JNIEnv * env, jclass clazz, jboolean new_grab) { |