AWTInput: Don't create the Robot before it is needed
This commit is contained in:
parent
00db5fcb85
commit
31079a10c1
|
@ -56,7 +56,6 @@ abstract class AbstractAWTInput implements AWTCanvasInputImplementation {
|
|||
|
||||
protected AbstractAWTInput(AWTGLCanvas canvas) {
|
||||
this.canvas = canvas;
|
||||
this.robot = AWTUtil.createRobot(canvas);
|
||||
}
|
||||
|
||||
protected MouseEventQueue getMouseEventQueue() {
|
||||
|
@ -127,6 +126,8 @@ abstract class AbstractAWTInput implements AWTCanvasInputImplementation {
|
|||
}
|
||||
|
||||
public void setCursorPosition(int x, int y) {
|
||||
if (robot == null)
|
||||
robot = AWTUtil.createRobot(canvas);
|
||||
AWTUtil.setCursorPosition(canvas, robot, x, y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue