diff options
author | trembovetski <[email protected]> | 2009-08-20 10:32:13 -0700 |
---|---|---|
committer | trembovetski <[email protected]> | 2009-08-20 10:32:13 -0700 |
commit | 29b675c229e3d797f2c454803e289765b0bc801c (patch) | |
tree | 7a18a750f9ee3b4cb009f5d19e5751cc73420857 /src/newt/native/MacWindow.m | |
parent | 7bed517f4ebf9323b1ee96d6194579792ed5dfd9 (diff) |
newt: one more attempt to commit insets-related changes
Diffstat (limited to 'src/newt/native/MacWindow.m')
-rw-r--r-- | src/newt/native/MacWindow.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m index 008a2417c..a93157c3f 100644 --- a/src/newt/native/MacWindow.m +++ b/src/newt/native/MacWindow.m @@ -55,7 +55,8 @@ NSString* jstringToNSString(JNIEnv* env, jstring jstr) void setFrameTopLeftPoint(NSWindow* win, jint x, jint y) { NSScreen* screen = [NSScreen mainScreen]; - NSRect visibleScreenRect = [screen visibleFrame]; + // this allows for better compatibility with awt behavior + NSRect visibleScreenRect = [screen frame]; NSPoint pt; pt = NSMakePoint(x, visibleScreenRect.origin.y + visibleScreenRect.size.height - y); @@ -89,6 +90,10 @@ NS_ENDHANDLER } [win setContentView: newView]; + // make sure the insets are updated in the java object + NewtMacWindow* newtw = (NewtMacWindow*)win; + [newtw updateInsets: env]; + return oldView; } |