--- old/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m 2015-05-12 15:40:44.000000000 +0400 +++ new/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m 2015-05-12 15:40:44.000000000 +0400 @@ -184,6 +184,7 @@ @synthesize isEnabled; @synthesize ownerWindow; @synthesize preFullScreenLevel; +@synthesize standardFrame; - (void) updateMinMaxSize:(BOOL)resizable { if (resizable) { @@ -509,6 +510,12 @@ // window exposing in _setVisible:(BOOL) } +- (NSRect)windowWillUseStandardFrame:(NSWindow *)window + defaultFrame:(NSRect)newFrame { + + return [self standardFrame]; +} + - (void) _deliverIconify:(BOOL)iconify { AWT_ASSERT_APPKIT_THREAD; @@ -953,6 +960,30 @@ /* * Class: sun_lwawt_macosx_CPlatformWindow + * Method: nativeSetNSWindowStandardFrame + * Signature: (JDDDD)V + */ +JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowStandardFrame +(JNIEnv *env, jclass clazz, jlong windowPtr, jdouble originX, jdouble originY, + jdouble width, jdouble height) +{ + JNF_COCOA_ENTER(env); + + NSRect jrect = NSMakeRect(originX, originY, width, height); + + NSWindow *nsWindow = OBJC(windowPtr); + [ThreadUtilities performOnMainThreadWaiting:NO block:^(){ + + NSRect rect = ConvertNSScreenRect(NULL, jrect); + AWTWindow *window = (AWTWindow*)[nsWindow delegate]; + window.standardFrame = rect; + }]; + + JNF_COCOA_EXIT(env); +} + +/* + * Class: sun_lwawt_macosx_CPlatformWindow * Method: nativeSetNSWindowMinMax * Signature: (JDDDD)V */