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:
parent
0d6eac80f7
commit
fffa870418
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue