From 663f9df53e0ddc1de8cca18aac1bc4fa3f09bd3e Mon Sep 17 00:00:00 2001 From: Alexander Zuev Date: Sat, 9 Jun 2012 19:18:24 +0400 Subject: [PATCH] 7173487: closed/java/awt/Frame/RemoveNotifyTest/RemoveNotifyTest.html Reviewed-by: anthony, dcherepanov, serb --- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java index fa13d0ef675..0e5888ee3de 100644 --- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java +++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java @@ -361,9 +361,11 @@ public class LWCToolkit extends LWToolkit { 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