[GLAMOR] White rectangles in Java windows when using XRender
The attached Java code (Test.java) should create a small window with a grey vertical bar, which is actually translucent and has rounded corners. Instead, the bar sometimes appears as a solid white rectangle with sharp corners (there are some instructions in the code as to how to reproduce more reliably).
This was reproduced in VMWare running Ubuntu 22.04 and Fedora 36, both using Wayland (Note: Java is still using X11). There seem to be no such problem on "real" hardware.
Known workarounds:
- Disable Glamor (set
XWAYLAND_NO_GLAMOR=1
in/etc/environment
, then reboot the system). - Change the default Java graphics pipeline to OpenGL: run java with
-Dsun.java2d.opengl=true
. - Stop using XRender extension: run java with
-Dsun.java2d.xrender=false
. This one is mostly for demonstration purposes as it creates other problems, just not this one.