changeset 13340:f8279bb6639f

8203955: Improve robot support Reviewed-by: prr, psadhukhan, rhalade, skoivu
author serb
date Tue, 21 Aug 2018 17:18:38 -0700
parents 5ba4548478b8
children b63702f5cc12
files src/share/classes/java/awt/Robot.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Robot.java	Tue Aug 21 11:43:03 2018 +0530
+++ b/src/share/classes/java/awt/Robot.java	Tue Aug 21 17:18:38 2018 -0700
@@ -391,6 +391,7 @@
      * @return  Color of the pixel
      */
     public synchronized Color getPixelColor(int x, int y) {
+        checkScreenCaptureAllowed();
         Color color = new Color(peer.getRGBPixel(x, y));
         return color;
     }