changeset 5412:677a1b6a10e6

7173487: [macosx] Problems with popup menus, tooltips and dialog boxes in dual monitor setup Reviewed-by: dcherepanov, serb
author kizune
date Tue, 19 Jun 2012 13:08:23 +0400
parents 8a2658f36157
children 30ac2b989455
files src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Fri Jun 15 14:16:18 2012 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Tue Jun 19 13:08:23 2012 +0400
@@ -368,9 +368,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