From 2b4bf2486d49afd93c1f06c875a4e163c801c98e Mon Sep 17 00:00:00 2001 From: anthony Date: Tue, 18 Mar 2008 16:19:03 +0300 Subject: [PATCH] 6589527: Window and Frame instances can hide their "Applet Warning" Summary: Additional constraints have been added for the setBounds() operation. Reviewed-by: son, art --- .../classes/sun/awt/X11/XDecoratedPeer.java | 54 ++++++++++- .../classes/sun/awt/X11/XDialogPeer.java | 3 +- .../sun/awt/X11/XEmbeddedFramePeer.java | 6 ++ .../classes/sun/awt/X11/XFramePeer.java | 3 +- .../classes/sun/awt/X11/XWindowPeer.java | 61 +++++++++++- .../classes/sun/awt/motif/MDialogPeer.java | 5 + .../sun/awt/motif/MEmbeddedFramePeer.java | 6 ++ .../classes/sun/awt/motif/MFramePeer.java | 5 + .../classes/sun/awt/motif/MWindowPeer.java | 94 +++++++++++++++++++ .../classes/sun/awt/windows/WDialogPeer.java | 11 ++- .../sun/awt/windows/WEmbeddedFramePeer.java | 6 ++ .../classes/sun/awt/windows/WFramePeer.java | 11 ++- .../classes/sun/awt/windows/WWindowPeer.java | 91 ++++++++++++++++++ src/windows/native/sun/windows/awt_Window.cpp | 22 +++++ src/windows/native/sun/windows/awt_Window.h | 6 ++ 15 files changed, 375 insertions(+), 9 deletions(-) diff --git a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java index e0b46de22..8aa308528 100644 --- a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java +++ b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java @@ -36,7 +36,7 @@ import java.util.logging.Logger; import sun.awt.ComponentAccessor; import sun.awt.SunToolkit; -class XDecoratedPeer extends XWindowPeer { +abstract class XDecoratedPeer extends XWindowPeer { private static final Logger log = Logger.getLogger("sun.awt.X11.XDecoratedPeer"); private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XDecoratedPeer"); private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XDecoratedPeer"); @@ -456,6 +456,15 @@ class XDecoratedPeer extends XWindowPeer { if (insLog.isLoggable(Level.FINE)) { insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape); } + if (userReshape) { + // We handle only userReshape == true cases. It means that + // if the window manager or any other part of the windowing + // system sets inappropriate size for this window, we can + // do nothing but accept it. + Rectangle reqBounds = newDimensions.getBounds(); + Rectangle newBounds = constrainBounds(reqBounds.x, reqBounds.y, reqBounds.width, reqBounds.height); + newDimensions = new WindowDimensions(newBounds, newDimensions.getInsets(), newDimensions.isClientSizeSet()); + } XToolkit.awtLock(); try { if (!isReparented() || !isVisible()) { @@ -571,6 +580,49 @@ class XDecoratedPeer extends XWindowPeer { reshape(dims, operation, userReshape); } + // This method gets overriden in XFramePeer & XDialogPeer. + abstract boolean isTargetUndecorated(); + + @Override + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't restrict the setBounds() operation if the code is trusted. + if (!hasWarningWindow()) { + return new Rectangle(x, y, width, height); + } + + // If it's undecorated or is not currently visible, + // apply the same constraints as for the Window. + if (!isVisible() || isTargetUndecorated()) { + return super.constrainBounds(x, y, width, height); + } + + // If it's visible & decorated, constraint the size only + int newX = x; + int newY = y; + int newW = width; + int newH = height; + + GraphicsConfiguration gc = ((Window)target).getGraphicsConfiguration(); + Rectangle sB = gc.getBounds(); + Insets sIn = ((Window)target).getToolkit().getScreenInsets(gc); + + Rectangle curBounds = getBounds(); + + int maxW = Math.max(sB.width - sIn.left - sIn.right, curBounds.width); + int maxH = Math.max(sB.height - sIn.top - sIn.bottom, curBounds.height); + + // First make sure the size is withing the visible part of the screen + if (newW > maxW) { + newW = maxW; + } + + if (newH > maxH) { + newH = maxH; + } + + return new Rectangle(newX, newY, newW, newH); + } + /** * @see java.awt.peer.ComponentPeer#setBounds */ diff --git a/src/solaris/classes/sun/awt/X11/XDialogPeer.java b/src/solaris/classes/sun/awt/X11/XDialogPeer.java index 248e6f8e6..40822e2c2 100644 --- a/src/solaris/classes/sun/awt/X11/XDialogPeer.java +++ b/src/solaris/classes/sun/awt/X11/XDialogPeer.java @@ -88,7 +88,8 @@ class XDialogPeer extends XDecoratedPeer implements DialogPeer { } } - private boolean isTargetUndecorated() { + @Override + boolean isTargetUndecorated() { if (undecorated != null) { return undecorated.booleanValue(); } else { diff --git a/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java b/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java index d33e545e2..b0cb3aa6d 100644 --- a/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java +++ b/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java @@ -184,6 +184,12 @@ public class XEmbeddedFramePeer extends XFramePeer { } } + @Override + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't constrain the bounds of the EmbeddedFrames + return new Rectangle(x, y, width, height); + } + // don't use getBounds() inherited from XDecoratedPeer public Rectangle getBounds() { return new Rectangle(x, y, width, height); diff --git a/src/solaris/classes/sun/awt/X11/XFramePeer.java b/src/solaris/classes/sun/awt/X11/XFramePeer.java index 5cd03b1b0..28989acc6 100644 --- a/src/solaris/classes/sun/awt/X11/XFramePeer.java +++ b/src/solaris/classes/sun/awt/X11/XFramePeer.java @@ -95,7 +95,8 @@ class XFramePeer extends XDecoratedPeer implements FramePeer, XConstants { } } - private boolean isTargetUndecorated() { + @Override + boolean isTargetUndecorated() { if (undecorated != null) { return undecorated.booleanValue(); } else { diff --git a/src/solaris/classes/sun/awt/X11/XWindowPeer.java b/src/solaris/classes/sun/awt/X11/XWindowPeer.java index c69e8f3a2..be6792089 100644 --- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java +++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java @@ -182,6 +182,9 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, GraphicsConfiguration gc = getGraphicsConfiguration(); ((X11GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this); + + Rectangle bounds = (Rectangle)(params.get(BOUNDS)); + params.put(BOUNDS, constrainBounds(bounds.x, bounds.y, bounds.width, bounds.height)); } private void initWMProtocols() { @@ -431,6 +434,56 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, return ownerPeer; } + // This method is overriden at the XDecoratedPeer to handle + // decorated windows a bit differently. + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't restrict the setBounds() operation if the code is trusted. + if (!hasWarningWindow()) { + return new Rectangle(x, y, width, height); + } + + // The window bounds should be within the visible part of the screen + int newX = x; + int newY = y; + int newW = width; + int newH = height; + + // Now check each point is within the visible part of the screen + GraphicsConfiguration gc = ((Window)target).getGraphicsConfiguration(); + Rectangle sB = gc.getBounds(); + Insets sIn = ((Window)target).getToolkit().getScreenInsets(gc); + + int screenX = sB.x + sIn.left; + int screenY = sB.y + sIn.top; + int screenW = sB.width - sIn.left - sIn.right; + int screenH = sB.height - sIn.top - sIn.bottom; + + + // First make sure the size is withing the visible part of the screen + if (newW > screenW) { + newW = screenW; + } + + if (newH > screenH) { + newH = screenH; + } + + // Tweak the location if needed + if (newX < screenX) { + newX = screenX; + } else if (newX + newW > screenX + screenW) { + newX = screenX + screenW - newW; + } + + if (newY < screenY) { + newY = screenY; + } else if (newY + newH > screenY + screenH) { + newY = screenY + screenH - newH; + } + + return new Rectangle(newX, newY, newW, newH); + } + //Fix for 6318144: PIT:Setting Min Size bigger than current size enlarges //the window but fails to revalidate, Sol-CDE //This bug is regression for @@ -439,10 +492,14 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, //Note that this function is overriden in XDecoratedPeer so event //posting is not changing for decorated peers public void setBounds(int x, int y, int width, int height, int op) { + Rectangle newBounds = constrainBounds(x, y, width, height); + XToolkit.awtLock(); try { Rectangle oldBounds = getBounds(); - super.setBounds(x, y, width, height, op); + + super.setBounds(newBounds.x, newBounds.y, newBounds.width, newBounds.height, op); + Rectangle bounds = getBounds(); XSizeHints hints = getHints(); @@ -1029,7 +1086,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, return !(target instanceof Frame || target instanceof Dialog); } boolean hasWarningWindow() { - return warningWindow != null; + return ((Window)target).getWarningString() != null; } // The height of menu bar window diff --git a/src/solaris/classes/sun/awt/motif/MDialogPeer.java b/src/solaris/classes/sun/awt/motif/MDialogPeer.java index 16ccab54c..5e22931aa 100644 --- a/src/solaris/classes/sun/awt/motif/MDialogPeer.java +++ b/src/solaris/classes/sun/awt/motif/MDialogPeer.java @@ -102,4 +102,9 @@ class MDialogPeer extends MWindowPeer implements DialogPeer, MInputMethodControl public void blockWindows(java.util.List toBlock) { // do nothing } + + @Override + final boolean isTargetUndecorated() { + return ((Dialog)target).isUndecorated(); + } } diff --git a/src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java b/src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java index d608721d9..60de1a245 100644 --- a/src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java +++ b/src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java @@ -204,4 +204,10 @@ public class MEmbeddedFramePeer extends MFramePeer { } public native Rectangle getBoundsPrivate(); + + @Override + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't constrain the bounds of the EmbeddedFrames + return new Rectangle(x, y, width, height); + } } diff --git a/src/solaris/classes/sun/awt/motif/MFramePeer.java b/src/solaris/classes/sun/awt/motif/MFramePeer.java index 99516d5a9..d772b99c4 100644 --- a/src/solaris/classes/sun/awt/motif/MFramePeer.java +++ b/src/solaris/classes/sun/awt/motif/MFramePeer.java @@ -503,4 +503,9 @@ class MFramePeer extends MWindowPeer implements FramePeer, MInputMethodControl { public Rectangle getBoundsPrivate() { return getBounds(); } + + @Override + final boolean isTargetUndecorated() { + return ((Frame)target).isUndecorated(); + } } diff --git a/src/solaris/classes/sun/awt/motif/MWindowPeer.java b/src/solaris/classes/sun/awt/motif/MWindowPeer.java index c59750aec..15c5c80de 100644 --- a/src/solaris/classes/sun/awt/motif/MWindowPeer.java +++ b/src/solaris/classes/sun/awt/motif/MWindowPeer.java @@ -113,6 +113,12 @@ DisplayChangedListener { insets.right = getInset("awt.frame.rightInset", -1); } + Rectangle bounds = target.getBounds(); + sysX = bounds.x; + sysY = bounds.y; + sysW = bounds.width; + sysH = bounds.height; + super.init(target); InputMethodManager imm = InputMethodManager.getInstance(); String menuString = imm.getTriggerMenuString(); @@ -150,6 +156,7 @@ DisplayChangedListener { GraphicsConfiguration gc = getGraphicsConfiguration(); ((X11GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this); + } /* Support for multiple icons is not implemented in MAWT */ @@ -246,6 +253,8 @@ DisplayChangedListener { // NOTE: This method may be called by privileged threads. // DO NOT INVOKE CLIENT CODE ON THIS THREAD! public void handleResize(int width, int height) { + sysW = width; + sysH = height; // REMIND: Is this secure? Can client code subclass input method? if (!tcList.isEmpty() && @@ -268,6 +277,8 @@ DisplayChangedListener { } public void handleMoved(int x, int y) { + sysX = x; + sysY = y; postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED)); } @@ -505,4 +516,87 @@ DisplayChangedListener { } return false; } + + private final boolean hasWarningWindow() { + return ((Window)target).getWarningString() != null; + } + + // This method is overriden at Dialog and Frame peers. + boolean isTargetUndecorated() { + return true; + } + + private volatile int sysX = 0; + private volatile int sysY = 0; + private volatile int sysW = 0; + private volatile int sysH = 0; + + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't restrict the setBounds() operation if the code is trusted. + if (!hasWarningWindow()) { + return new Rectangle(x, y, width, height); + } + + int newX = x; + int newY = y; + int newW = width; + int newH = height; + + GraphicsConfiguration gc = ((Window)target).getGraphicsConfiguration(); + Rectangle sB = gc.getBounds(); + Insets sIn = ((Window)target).getToolkit().getScreenInsets(gc); + + int screenW = sB.width - sIn.left - sIn.right; + int screenH = sB.height - sIn.top - sIn.bottom; + + // If it's undecorated or is not currently visible, + // then check each point is within the visible part of the screen + if (!target.isVisible() || isTargetUndecorated()) { + int screenX = sB.x + sIn.left; + int screenY = sB.y + sIn.top; + + // First make sure the size is withing the visible part of the screen + if (newW > screenW) { + newW = screenW; + } + + if (newH > screenH) { + newH = screenH; + } + + // Tweak the location if needed + if (newX < screenX) { + newX = screenX; + } else if (newX + newW > screenX + screenW) { + newX = screenX + screenW - newW; + } + + if (newY < screenY) { + newY = screenY; + } else if (newY + newH > screenY + screenH) { + newY = screenY + screenH - newH; + } + } else { + int maxW = Math.max(screenW, sysW); + int maxH = Math.max(screenH, sysH); + + // Make sure the size is withing the visible part of the screen + // OR is less that the current size of the window. + if (newW > maxW) { + newW = maxW; + } + + if (newH > maxH) { + newH = maxH; + } + } + + return new Rectangle(newX, newY, newW, newH); + } + + public void setBounds(int x, int y, int width, int height, int op) { + Rectangle newBounds = constrainBounds(x, y, width, height); + super.setBounds(newBounds.x, newBounds.y, newBounds.width, newBounds.height, op); + } + } diff --git a/src/windows/classes/sun/awt/windows/WDialogPeer.java b/src/windows/classes/sun/awt/windows/WDialogPeer.java index 735e5f9f1..4056c4a6f 100644 --- a/src/windows/classes/sun/awt/windows/WDialogPeer.java +++ b/src/windows/classes/sun/awt/windows/WDialogPeer.java @@ -108,11 +108,18 @@ class WDialogPeer extends WWindowPeer implements DialogPeer { } } + @Override + boolean isTargetUndecorated() { + return ((Dialog)target).isUndecorated(); + } + public void reshape(int x, int y, int width, int height) { + Rectangle newBounds = constrainBounds(x, y, width, height); + if (((Dialog)target).isUndecorated()) { - super.reshape(x,y,width,height); + super.reshape(newBounds.x, newBounds.y, newBounds.width, newBounds.height); } else { - reshapeFrame(x,y,width,height); + reshapeFrame(newBounds.x, newBounds.y, newBounds.width, newBounds.height); } } diff --git a/src/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java b/src/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java index 56513d308..8c446ff91 100644 --- a/src/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java +++ b/src/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java @@ -65,4 +65,10 @@ public class WEmbeddedFramePeer extends WFramePeer { public native Rectangle getBoundsPrivate(); public native void synthesizeWmActivate(boolean doActivate); + + @Override + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't constrain the bounds of the EmbeddedFrames + return new Rectangle(x, y, width, height); + } } diff --git a/src/windows/classes/sun/awt/windows/WFramePeer.java b/src/windows/classes/sun/awt/windows/WFramePeer.java index cdf23ec7d..2667fafe0 100644 --- a/src/windows/classes/sun/awt/windows/WFramePeer.java +++ b/src/windows/classes/sun/awt/windows/WFramePeer.java @@ -64,11 +64,18 @@ class WFramePeer extends WWindowPeer implements FramePeer { } } + @Override + boolean isTargetUndecorated() { + return ((Frame)target).isUndecorated(); + } + public void reshape(int x, int y, int width, int height) { + Rectangle newBounds = constrainBounds(x, y, width, height); + if (((Frame)target).isUndecorated()) { - super.reshape(x,y,width,height); + super.reshape(newBounds.x, newBounds.y, newBounds.width, newBounds.height); } else { - reshapeFrame(x,y,width,height); + reshapeFrame(newBounds.x, newBounds.y, newBounds.width, newBounds.height); } } diff --git a/src/windows/classes/sun/awt/windows/WWindowPeer.java b/src/windows/classes/sun/awt/windows/WWindowPeer.java index 03fb08c7c..070c67dd1 100644 --- a/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -434,6 +434,97 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer { private native void nativeGrab(); private native void nativeUngrab(); + private final boolean hasWarningWindow() { + return ((Window)target).getWarningString() != null; + } + + boolean isTargetUndecorated() { + return true; + } + + // These are the peer bounds. They get updated at: + // 1. the WWindowPeer.setBounds() method. + // 2. the native code (on WM_SIZE/WM_MOVE) + private volatile int sysX = 0; + private volatile int sysY = 0; + private volatile int sysW = 0; + private volatile int sysH = 0; + + Rectangle constrainBounds(int x, int y, int width, int height) { + // We don't restrict the setBounds() operation if the code is trusted. + if (!hasWarningWindow()) { + return new Rectangle(x, y, width, height); + } + + int newX = x; + int newY = y; + int newW = width; + int newH = height; + + GraphicsConfiguration gc = ((Window)target).getGraphicsConfiguration(); + Rectangle sB = gc.getBounds(); + Insets sIn = ((Window)target).getToolkit().getScreenInsets(gc); + + int screenW = sB.width - sIn.left - sIn.right; + int screenH = sB.height - sIn.top - sIn.bottom; + + // If it's undecorated or is not currently visible + if (!((Window)target).isVisible() || isTargetUndecorated()) { + // Now check each point is within the visible part of the screen + int screenX = sB.x + sIn.left; + int screenY = sB.y + sIn.top; + + // First make sure the size is withing the visible part of the screen + if (newW > screenW) { + newW = screenW; + } + + if (newH > screenH) { + newH = screenH; + } + + // Tweak the location if needed + if (newX < screenX) { + newX = screenX; + } else if (newX + newW > screenX + screenW) { + newX = screenX + screenW - newW; + } + + if (newY < screenY) { + newY = screenY; + } else if (newY + newH > screenY + screenH) { + newY = screenY + screenH - newH; + } + } else { + int maxW = Math.max(screenW, sysW); + int maxH = Math.max(screenH, sysH); + + // Make sure the size is withing the visible part of the screen + // OR less that the current size of the window. + if (newW > maxW) { + newW = maxW; + } + + if (newH > maxH) { + newH = maxH; + } + } + + return new Rectangle(newX, newY, newW, newH); + } + + @Override + public void setBounds(int x, int y, int width, int height, int op) { + Rectangle newBounds = constrainBounds(x, y, width, height); + + sysX = newBounds.x; + sysY = newBounds.y; + sysW = newBounds.width; + sysH = newBounds.height; + + super.setBounds(newBounds.x, newBounds.y, newBounds.width, newBounds.height, op); + } + /* * The method maps the list of the active windows to the window's AppContext, * then the method registers ActiveWindowListener, GuiDisposedListener listeners; diff --git a/src/windows/native/sun/windows/awt_Window.cpp b/src/windows/native/sun/windows/awt_Window.cpp index 866dffaf1..eda6e178c 100644 --- a/src/windows/native/sun/windows/awt_Window.cpp +++ b/src/windows/native/sun/windows/awt_Window.cpp @@ -125,6 +125,11 @@ jfieldID AwtWindow::autoRequestFocusID; jclass AwtWindow::wwindowPeerCls; jmethodID AwtWindow::getActiveWindowsMID; +jfieldID AwtWindow::sysXID; +jfieldID AwtWindow::sysYID; +jfieldID AwtWindow::sysWID; +jfieldID AwtWindow::sysHID; + int AwtWindow::ms_instanceCounter = 0; HHOOK AwtWindow::ms_hCBTFilter; AwtWindow * AwtWindow::m_grabbedWindow = NULL; @@ -1052,6 +1057,8 @@ MsgRouting AwtWindow::WmMove(int x, int y) (env)->SetIntField(target, AwtComponent::xID, rect.left); (env)->SetIntField(target, AwtComponent::yID, rect.top); + (env)->SetIntField(peer, AwtWindow::sysXID, rect.left); + (env)->SetIntField(peer, AwtWindow::sysYID, rect.top); SendComponentEvent(java_awt_event_ComponentEvent_COMPONENT_MOVED); env->DeleteLocalRef(target); @@ -1115,6 +1122,11 @@ MsgRouting AwtWindow::WmSize(UINT type, int w, int h) (env)->SetIntField(target, AwtComponent::widthID, newWidth); (env)->SetIntField(target, AwtComponent::heightID, newHeight); + + jobject peer = GetPeer(env); + (env)->SetIntField(peer, AwtWindow::sysWID, newWidth); + (env)->SetIntField(peer, AwtWindow::sysHID, newHeight); + if (!AwtWindow::IsResizing()) { WindowResized(); } @@ -1750,17 +1762,22 @@ void AwtWindow::_ReshapeFrame(void *param) // Fix for 4459064 : do not enforce thresholds for embedded frames if (!p->IsEmbeddedFrame()) { + jobject peer = p->GetPeer(env); int minWidth = ::GetSystemMetrics(SM_CXMIN); int minHeight = ::GetSystemMetrics(SM_CYMIN); if (w < minWidth) { env->SetIntField(target, AwtComponent::widthID, w = minWidth); + env->SetIntField(peer, AwtWindow::sysWID, + w); } if (h < minHeight) { env->SetIntField(target, AwtComponent::heightID, h = minHeight); + env->SetIntField(peer, AwtWindow::sysHID, + h); } } env->DeleteLocalRef(target); @@ -2144,6 +2161,11 @@ Java_sun_awt_windows_WWindowPeer_initIDs(JNIEnv *env, jclass cls) env->GetStaticMethodID(cls, "getActiveWindowHandles", "()[J"); DASSERT(AwtWindow::getActiveWindowsMID != NULL); + AwtWindow::sysXID = env->GetFieldID(cls, "sysX", "I"); + AwtWindow::sysYID = env->GetFieldID(cls, "sysY", "I"); + AwtWindow::sysWID = env->GetFieldID(cls, "sysW", "I"); + AwtWindow::sysHID = env->GetFieldID(cls, "sysH", "I"); + CATCH_BAD_ALLOC; } diff --git a/src/windows/native/sun/windows/awt_Window.h b/src/windows/native/sun/windows/awt_Window.h index ca3b68c32..8e654a2d8 100644 --- a/src/windows/native/sun/windows/awt_Window.h +++ b/src/windows/native/sun/windows/awt_Window.h @@ -62,6 +62,12 @@ public: /* long[] getActiveWindowHandles() method in WWindowPeer */ static jmethodID getActiveWindowsMID; + // The coordinates at the peer. + static jfieldID sysXID; + static jfieldID sysYID; + static jfieldID sysWID; + static jfieldID sysHID; + AwtWindow(); virtual ~AwtWindow(); -- GitLab