< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m
Print this page
rev 55352 : JB_base_webrev
*** 1169,1178 ****
--- 1169,1180 ----
}];
JNF_COCOA_EXIT(env);
}
+ extern jboolean metalEnabled;
+
/*
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeGetNSWindowInsets
* Signature: (J)Ljava/awt/Insets;
*/
*** 1195,1204 ****
--- 1197,1210 ----
jint top = (jint)(frame.size.height - contentRect.size.height);
jint left = (jint)(contentRect.origin.x - frame.origin.x);
jint bottom = (jint)(contentRect.origin.y - frame.origin.y);
jint right = (jint)(frame.size.width - (contentRect.size.width + left));
+ if (metalEnabled == JNI_TRUE) {
+ bottom -= top;
+ top = 0;
+ }
static JNF_CLASS_CACHE(jc_Insets, "java/awt/Insets");
static JNF_CTOR_CACHE(jc_Insets_ctor, jc_Insets, "(IIII)V");
ret = JNFNewObject(env, jc_Insets_ctor, top, left, bottom, right);
< prev index next >