diff options
author | Sven Gothel <[email protected]> | 2011-10-12 11:12:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-12 11:12:59 +0200 |
commit | 22f8e786219166019688ff2eea6ff9570c117544 (patch) | |
tree | 4eb2d0832f09b00a10f853ba1254a7614dcf03ff /src/nativewindow | |
parent | 1d417866d42286bdcd367bb7c0e8798e86e46060 (diff) |
NativeWindow/OSX: Use screen of window
Diffstat (limited to 'src/nativewindow')
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nativewindow/native/macosx/OSXmisc.c b/src/nativewindow/native/macosx/OSXmisc.c index 8c558272d..fe0d59bd7 100644 --- a/src/nativewindow/native/macosx/OSXmisc.c +++ b/src/nativewindow/native/macosx/OSXmisc.c @@ -80,9 +80,6 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetLocationOnS * return location in 0/0 top-left space, * OSX is 0/0 bottom-left space naturally */ - NSScreen* screen = [NSScreen mainScreen]; - NSRect screenRect = [screen frame]; - NSRect r; int dest_x=-1; int dest_y=-1; @@ -100,6 +97,8 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetLocationOnS } else { NativewindowCommon_throwNewRuntimeException(env, "neither win not view %p\n", nsObj); } + NSScreen* screen = [win screen]; + NSRect screenRect = [screen frame]; NSRect viewFrame = [view frame]; |