< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m

Print this page

        

@@ -1426,13 +1426,13 @@
     [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
         
         NSRect viewBounds = [view bounds];
         NSRect frameInWindow = [view convertRect:viewBounds toView:nil];
         rect = [[view window] convertRectToScreen:frameInWindow];
-        NSRect screenRect = [[NSScreen mainScreen] frame];
         //Convert coordinates to top-left corner origin
-        rect.origin.y = screenRect.size.height - rect.origin.y - viewBounds.size.height;
+        rect = ConvertNSScreenRect(NULL, rect);
+
     }];
     jRect = NSToJavaRect(env, rect);
     
     JNF_COCOA_EXIT(env);
     
< prev index next >