7173487: closed/java/awt/Frame/RemoveNotifyTest/RemoveNotifyTest.html
authorkizune
Sat, 09 Jun 2012 19:18:24 +0400
changeset 13000 beeb6378dd37
parent 12999 d0cec5582bd7
child 13001 afa8e122dcce
7173487: closed/java/awt/Frame/RemoveNotifyTest/RemoveNotifyTest.html Reviewed-by: anthony, dcherepanov, serb
jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Sat Jun 09 17:42:46 2012 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Sat Jun 09 19:18:24 2012 +0400
@@ -361,9 +361,11 @@
             CWrapper.NSObject.release(screen);
         }
         // Convert between Cocoa's coordinate system and Java.
-        return new Insets(fullScreen.height - workArea.height - workArea.y,
-                          workArea.x, workArea.y,
-                          fullScreen.width - workArea.width - workArea.x);
+        int bottom = workArea.y - fullScreen.y;
+        int top = fullScreen.height - workArea.height - bottom;
+        int left = workArea.x - fullScreen.x;
+        int right = fullScreen.width - workArea.width - left;
+        return  new Insets(top, left, bottom, right);
     }
 
     @Override