Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4135895

Java does not provide support for X11 GrayScale visuals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • client-libs
    • None
    • 2d
    • 1.2fcs
    • sparc
    • solaris_2.5
    • Not verified

      If a Java2D program is run on an X11 system which only presents GrayScale or
      StaticGray visuals, the program will throw an exception after it
      attempts to get the GraphicsConfiguration type.

      The offending code is in src/solaris/native/sun/awt/awt_GraphicsEnv.c

      Java_sun_awt_X11GraphicsDevice_getConfigType
          (JNIEnv *env, jobject this, jint index)
      {
          switch (awt_visInfo.class) {
          case TrueColor:
              return (awt_visInfo.red_mask == 0xff
                      ? sun_awt_X11GraphicsConfig_TRUE_24_BGR
                      : sun_awt_X11GraphicsConfig_TRUE_24_RGB);
          case PseudoColor:
              return sun_awt_X11GraphicsConfig_PSEUDO_8;
          }
          return sun_awt_X11GraphicsConfig_UNKNOWN;
      }

      If the device does not support either TrueColor or PseudoColor
      visuals, the call returns sun_awt_X11GraphicsConfig_UNKNOWN
      which causes an exception to be thrown.

      This bug is somewhat related to bug# 4114496.

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: