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

Robot.getPixelColor() fails with root window and behave in similar fashion with non-opaque frames on Linux

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 9
    • client-libs
    • None

      RULE java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java Exception java.lang.RuntimeException: Test FAILED: frame pixel at (0, 0) is not transparent

      For example on EOL 7, Gnome 3 out of box, if the test Frame (not opaque) is placed on the root window, the test pass since a color reported by Robot.getPixelColor() is always black, whatever is a window background.

      If, however , there is some application behind the Frame (say, Terminal), reported color is black only as visible through the transparent part of the Frame; before the Frame is painted, color is a correct color of application window.

      Thus the test always doesn't work. It should be the issue with getPixelColor() on transparent window but also getPixelColor of the root window of X11 (is it the same problem?).

      I'm not sure about other platforms yet.

            azvegint Alexander Zvegintsev
            yan Yuri Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: