From 22f8e786219166019688ff2eea6ff9570c117544 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 12 Oct 2011 11:12:59 +0200 Subject: NativeWindow/OSX: Use screen of window --- src/nativewindow/native/macosx/OSXmisc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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]; -- cgit v1.2.3