diff options
author | Sven Gothel <[email protected]> | 2011-10-29 15:14:21 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-29 15:14:21 +0200 |
commit | 34ef2815dd0f4dc84f35fe5bf72ea876d4b9e882 (patch) | |
tree | b79694f3104319ff7be9329511bf9fdbd9caf25d /src/nativewindow | |
parent | 6a770d1ec80a656db62feb8100e3fe58800e79af (diff) | |
parent | 48bc1b090b57eb8ec3cb2f9ff33b69c9d99704d7 (diff) |
Merge branch 'master' into osx_jawt_calayers
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index af71b4a0a..e19d5ecf7 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -112,15 +112,19 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetLocationOnS } NSScreen* screen = [win screen]; NSRect screenRect = [screen frame]; - - NSRect viewFrame = [view frame]; + NSRect winFrame = [win frame]; r.origin.x = src_x; - r.origin.y = viewFrame.size.height - src_y; // y-flip for 0/0 top-left + r.origin.y = winFrame.size.height - src_y; // y-flip for 0/0 top-left r.size.width = 0; r.size.height = 0; // NSRect rS = [win convertRectToScreen: r]; // 10.7 NSPoint oS = [win convertBaseToScreen: r.origin]; + /** + NSLog(@"LOS.1: (bottom-left) %d/%d, screen-y[0: %d, h: %d], (top-left) %d/%d\n", + (int)oS.x, (int)oS.y, (int)screenRect.origin.y, (int) screenRect.size.height, + (int)oS.x, (int)(screenRect.origin.y + screenRect.size.height - oS.y)); */ + dest_x = (int) oS.x; dest_y = (int) screenRect.origin.y + screenRect.size.height - oS.y; |