OpenJDK / portola / portola
changeset 54258:a17f46493e0b
8214109: XToolkit is not correctly displayed color on 16-bit high color setting
Reviewed-by: serb, prr
author | dmarkov |
---|---|
date | Tue, 26 Feb 2019 18:12:06 +0000 |
parents | 17da5f618aaf |
children | 6673d2b7e084 |
files | src/java.desktop/unix/classes/sun/awt/X11/XWindow.java |
diffstat | 1 files changed, 1 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Tue Feb 26 03:24:34 2019 -0800 +++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Tue Feb 26 18:12:06 2019 +0000 @@ -449,14 +449,7 @@ if (!doEraseBackground()) { return; } - // 6304250: XAWT: Items in choice show a blue border on OpenGL + Solaris10 when background color is set - // Note: When OGL is enabled, surfaceData.pixelFor() will not - // return a pixel value appropriate for passing to - // XSetWindowBackground(). Therefore, we will use the ColorModel - // for this component in order to calculate a pixel value from - // the given RGB value. - ColorModel cm = getColorModel(); - int pixel = PixelConverter.instance.rgbToPixel(c.getRGB(), cm); + int pixel = surfaceData.pixelFor(c.getRGB()); XlibWrapper.XSetWindowBackground(XToolkit.getDisplay(), getContentWindow(), pixel); XlibWrapper.XClearWindow(XToolkit.getDisplay(), getContentWindow()); }