diff --git a/src/java/org/lwjgl/input/Cursor.java b/src/java/org/lwjgl/input/Cursor.java index 6cee815c..67b1e7ea 100644 --- a/src/java/org/lwjgl/input/Cursor.java +++ b/src/java/org/lwjgl/input/Cursor.java @@ -173,9 +173,18 @@ public class Cursor { } /** - * Destroy the native cursor. Cursor must not be current. + * Destroy the native cursor. If the cursor is current, + * the current native cursor is set to null (the default + * OS cursor) */ public void destroy() { + if (Mouse.getNativeCursor() == this) { + try { + Mouse.setNativeCursor(null); + } catch (LWJGLException e) { + // ignore + } + } for(int i=0; i current_x - POINTER_WARP_BORDER && - event.xmotion.x < current_x + POINTER_WARP_BORDER && - event.xmotion.y > current_y - POINTER_WARP_BORDER && - event.xmotion.y < current_y + POINTER_WARP_BORDER) - break; - printfDebug("Skipped event searching for warp event %d, %d\n", event.xmotion.x, event.xmotion.y); - } - if (i == WARP_RETRY) - printfDebug("Never got warp event\n");*/ } static void warpPointer(void) {