< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XWM.java
Print this page
@@ -1022,12 +1022,16 @@
try {
Rectangle shellBounds = window.getShellBounds();
shellBounds.translate(-window.currentInsets.left, -window.currentInsets.top);
window.updateSizeHints(window.getDimensions());
requestWMExtents(window.getWindow());
- XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), window.getShell(),
- shellBounds.x, shellBounds.y, shellBounds.width, shellBounds.height);
+ XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(),
+ window.getShell(),
+ window.scaleUp(shellBounds.x),
+ window.scaleUp(shellBounds.y),
+ window.scaleUp(shellBounds.width),
+ window.scaleUp(shellBounds.height));
/* REMINDER: will need to revisit when setExtendedStateBounds is added */
//Fix for 4320050: Minimum size for java.awt.Frame is not being enforced.
//We need to update frame's minimum size, not to reset it
removeSizeHints(window, XUtilConstants.PMaxSize);
window.updateMinimumSize();
@@ -1056,12 +1060,16 @@
/* Fix min/max size hints at the specified values */
if (!shellBounds.isEmpty()) {
window.updateSizeHints(newDimensions);
requestWMExtents(window.getWindow());
XToolkit.XSync();
- XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), window.getShell(),
- shellBounds.x, shellBounds.y, shellBounds.width, shellBounds.height);
+ XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(),
+ window.getShell(),
+ window.scaleUp(shellBounds.x),
+ window.scaleUp(shellBounds.y),
+ window.scaleUp(shellBounds.width),
+ window.scaleUp(shellBounds.height));
}
if (!justChangeSize) { /* update decorations */
setShellDecor(window);
}
} finally {
@@ -1699,10 +1707,16 @@
} finally {
lwinAttr.dispose();
pattr.dispose();
}
}
+
+ correctWM.top = win.scaleUp(correctWM.top);
+ correctWM.bottom = win.scaleUp(correctWM.bottom);
+ correctWM.left = win.scaleUp(correctWM.left);
+ correctWM.right = win.scaleUp(correctWM.right);
+
if (storedInsets.get(win.getClass()) == null) {
storedInsets.put(win.getClass(), correctWM);
}
return correctWM;
}
< prev index next >