<AWT Dev> Request for review: x11 - ensure non zero heights and widths
Omair Majid
omajid at redhat.com
Fri Sep 24 07:12:53 PDT 2010
Hi,
While trying out a Java program, I noticed that some BadValue X errors
were being reported (I had to set -Dsun.awt.noisyerrorhandler=True
first). The webrev at
http://cr.openjdk.java.net/~omajid/webrevs/x11-bad-widths-heights/webrev.00/
attempts to fix the issue.
The problem is that there are some cases where the jdk is creating or
resizing windows and setting widths and/or heights to 0. The man page
for XResizeWindow states "If either width or height is zero, a BadValue
error results". I looked at the source code for xorg-xserver and it
appears that specifying a height or width of 0 for pretty much any X
call will cause a BadValue error.
The patch takes an approach similar to what is currently being done in
XBaseWindow.xSetBounds(). It checks heights and widths, setting them to
1 if needed.
Any comments?
Cheers,
Omair
More information about the awt-dev
mailing list