< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XWM.java
Print this page
*** 1022,1033 ****
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);
/* 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();
--- 1022,1037 ----
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(),
! 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,1067 ****
/* 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);
}
if (!justChangeSize) { /* update decorations */
setShellDecor(window);
}
} finally {
--- 1060,1075 ----
/* 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(),
! window.scaleUp(shellBounds.x),
! window.scaleUp(shellBounds.y),
! window.scaleUp(shellBounds.width),
! window.scaleUp(shellBounds.height));
}
if (!justChangeSize) { /* update decorations */
setShellDecor(window);
}
} finally {
*** 1699,1708 ****
--- 1707,1722 ----
} 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 >