From d28381e1cdd4887ce16d11c2fb8689ff31221d45 Mon Sep 17 00:00:00 2001 From: kappaOne Date: Sat, 16 Feb 2013 00:31:10 +0000 Subject: [PATCH] minor tweak to comments --- src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m b/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m index 3139ecf5..1d625ee1 100644 --- a/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m +++ b/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m @@ -49,10 +49,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nGrabMouse(JNIEnv *env, jclass this, jboolean grab) { CGAssociateMouseAndMouseCursorPosition(grab == JNI_TRUE ? FALSE : TRUE); - if (grab) + if (grab) { CGDisplayHideCursor(kCGDirectMainDisplay); - else + } + else { CGDisplayShowCursor(kCGDirectMainDisplay); + } } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nSetCursorPosition(JNIEnv *env, jclass this, jobject window_handle, jint x, jint y) { @@ -93,8 +95,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nRegisterMouseLis [window_info->window setAcceptsMouseMovedEvents:YES]; window_info->jmouse = (*env)->NewGlobalRef(env, _this); - // since initial mouse is reported until mouse is moved, manually - // get the mouse location and report it with a fake event + // since initial mouse location is not reported until mouse is moved + // manually get the mouse location and report it with a fake event NSPoint mouseLocation = [window_info->window mouseLocationOutsideOfEventStream]; mouseLocation = [window_info->view convertPoint:mouseLocation fromView:nil];