correct behavior on OS X Display.getY() by using the screen the

window is on rather than the screen with keyboard focus
This commit is contained in:
kappaOne 2012-12-25 13:51:24 +00:00
parent 0d6eac80f7
commit fffa870418
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetX(JNIEnv *env, jo
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetY(JNIEnv *env, jobject this, jobject window_handle) {
MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle);
NSRect screenRect = [[NSScreen mainScreen] frame];
NSRect screenRect = [[[window_info->view window] screen] frame];
NSRect winRect = [[window_info->view window] frame];
// get top corner of window frame, also flip coords so origin is in top left