<AWT Dev> RFR: 8239819 XToolkit: Misread of screen information memory
Sergey.Bylokhov at oracle.com
Sat Feb 22 09:05:54 UTC 2020
Please review the fix for jdk/client.
The XAWT for some native structures uses special java wrappers. These
wrappers have to be created on top of the native pointer and provide
access to the native fields directly w/o JNI methods.
We have incorrect usage of such wrapper in the XToolkit class:
Toolkit creates AwtScreenData wrapper on top of the XToolkit.getDefaultScreenData()
But unfortunately, this native method returns the wrong pointer
getScreenData() should be used instead of getDefaultConfig(), but since native
data for default configuration is bigger than screen data we most of the
time read some "random" information about visual info.
This code was added 17 years ago to set the background color of the
XIconWindow which is used as an icon in the dock/taskbar/minimized icon.
Looks like nobody noticed since then that the color used as a border is
incorrect, because this color is actually is invisible.
I have confirmed this using different color variants and even checked
mwm(kind of cde on linux). So decided revert that fix back.
Best regards, Sergey.
More information about the awt-dev