--- old/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java 2016-03-08 12:22:32.272981158 +0100 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java 2016-03-08 12:22:32.187982551 +0100 @@ -35,7 +35,6 @@ class XRobotPeer implements RobotPeer { - private static volatile boolean isGtkSupported; private X11GraphicsConfig xgc = null; /* * native implementation uses some static shared data (pipes, processes) @@ -48,14 +47,6 @@ SunToolkit tk = (SunToolkit)Toolkit.getDefaultToolkit(); setup(tk.getNumberOfButtons(), AWTAccessor.getInputEventAccessor().getButtonDownMasks()); - - Toolkit toolkit = Toolkit.getDefaultToolkit(); - if (!isGtkSupported) { - if (toolkit instanceof UNIXToolkit - && ((UNIXToolkit) toolkit).loadGTK()) { - isGtkSupported = true; - } - } } @Override @@ -103,8 +94,7 @@ @Override public int getRGBPixel(int x, int y) { int pixelArray[] = new int[1]; - getRGBPixelsImpl(xgc, x, y, 1, 1, xgc.getScale(), pixelArray, - isGtkSupported); + getRGBPixelsImpl(xgc, x, y, 1, 1, xgc.getScale(), pixelArray); return pixelArray[0]; } @@ -112,7 +102,7 @@ public int [] getRGBPixels(Rectangle bounds) { int pixelArray[] = new int[bounds.width*bounds.height]; getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, - xgc.getScale(), pixelArray, isGtkSupported); + xgc.getScale(), pixelArray); return pixelArray; } @@ -127,6 +117,5 @@ private static synchronized native void keyReleaseImpl(int keycode); private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc, - int x, int y, int width, int height, int scale, - int pixelArray[], boolean isGtkSupported); + int x, int y, int width, int height, int scale, int pixelArray[]); }