mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-20 07:58:55 +00:00
6987945: XDecoratedPeer shouldn't allow to resize a frame to zero size
Reviewed-by: anthony
This commit is contained in:
parent
07a295701d
commit
6e5fbc5669
@ -705,12 +705,8 @@ public class XBaseWindow {
|
||||
throw new IllegalStateException("Attempt to resize uncreated window");
|
||||
}
|
||||
insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height);
|
||||
if (width <= 0) {
|
||||
width = 1;
|
||||
}
|
||||
if (height <= 0) {
|
||||
height = 1;
|
||||
}
|
||||
width = Math.max(MIN_SIZE, width);
|
||||
height = Math.max(MIN_SIZE, height);
|
||||
XToolkit.awtLock();
|
||||
try {
|
||||
XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), getWindow(), x,y,width,height);
|
||||
|
||||
@ -763,12 +763,8 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
}
|
||||
|
||||
private void checkShellRectSize(Rectangle shellRect) {
|
||||
if (shellRect.width < 0) {
|
||||
shellRect.width = 1;
|
||||
}
|
||||
if (shellRect.height < 0) {
|
||||
shellRect.height = 1;
|
||||
}
|
||||
shellRect.width = Math.max(MIN_SIZE, shellRect.width);
|
||||
shellRect.height = Math.max(MIN_SIZE, shellRect.height);
|
||||
}
|
||||
|
||||
private void checkShellRectPos(Rectangle shellRect) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user