< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
Print this page
@@ -49,10 +49,11 @@
private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
+ private static native void nativeSetNSWindowLocationByPlatform(long nsWindowPtr);
private static native void nativeSetNSWindowStandardFrame(long nsWindowPtr,
double x, double y, double w, double h);
private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
private static native void nativePushNSWindowToBack(long nsWindowPtr);
private static native void nativePushNSWindowToFront(long nsWindowPtr);
@@ -528,10 +529,14 @@
updateIconImages();
updateFocusabilityForAutoRequestFocus(false);
boolean wasMaximized = isMaximized();
+ if (visible && target.isLocationByPlatform()) {
+ nativeSetNSWindowLocationByPlatform(getNSWindowPtr());
+ }
+
// Actually show or hide the window
LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
if (blocker == null || !visible) {
// If it ain't blocked, or is being hidden, go regular way
if (visible) {
< prev index next >