changeset 53133:42037e059f2c

8203955: Improve robot support Reviewed-by: prr, psadhukhan, rhalade, skoivu
author serb
date Tue, 21 Aug 2018 13:57:18 -0700
parents db7b41933563
children 2cdf4a989ee7
files src/java.desktop/share/classes/java/awt/Robot.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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();