diff --git a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java index fa13d0ef675fa02bc35a03f075b32129943093ec..0e5888ee3de61440fe2508ec27d8446d1304ac67 100644 --- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java +++ b/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