8203955: Improve robot support
authorserb
Tue, 21 Aug 2018 13:57:18 -0700
changeset 53320 42037e059f2c
parent 53319 db7b41933563
child 53321 2cdf4a989ee7
8203955: Improve robot support Reviewed-by: prr, psadhukhan, rhalade, skoivu
src/java.desktop/share/classes/java/awt/Robot.java
--- a/src/java.desktop/share/classes/java/awt/Robot.java	Thu Aug 16 10:22:25 2018 -0700
+++ b/src/java.desktop/share/classes/java/awt/Robot.java	Tue Aug 21 13:57:18 2018 -0700
@@ -394,6 +394,7 @@
      * @return  Color of the pixel
      */
     public synchronized Color getPixelColor(int x, int y) {
+        checkScreenCaptureAllowed();
         AffineTransform tx = GraphicsEnvironment.
                 getLocalGraphicsEnvironment().getDefaultScreenDevice().
                 getDefaultConfiguration().getDefaultTransform();