--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m Wed May 20 17:10:15 2015 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m Fri May 22 15:19:05 2015 +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
*/