sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21706
[Bug 1238027] Re: [1.0.1] Linux: Screen capture sometimes fails to create a selection
Hey RaiMan,
On my machine it seems like the problem is resolved by doing the
following:
On class org.sikuli.ide.ButtonCapture on line 108 the ide is set to
visible and requests the focus after the prompt for the image selection.
p.prompt("Select an image");
try {
Thread.sleep(500);
} catch (Exception e) {
}
if (delay != 0) {
ide.setVisible(true);
}
ide.requestFocus();
Change that to p.prompt("Select an image"); only.
Setting the ide to visible and request focus should only occur after the
selection. This is done on the same class in the method
update(EventSubject s)
Define SikuliIDE ide = SikuliIDE.getInstance();
Then at the end of the method:
if (filename != null) {
String fullpath = Utils.saveImage(simg.getImage(),
filename, pane.getSrcBundle());
if (fullpath != null) {
captureCompleted(Utils.slashify(fullpath, false), cp);
ide.setVisible(true);
ide.requestFocus();
return;
}
}
}
ide.setVisible(true);
ide.requestFocus();
captureCompleted(null, cp);
Works now for me. Tested on opensuse only.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1238027
Title:
[1.0.1] Linux: Screen capture sometimes fails to create a selection
Status in Sikuli:
In Progress
Bug description:
I am frequently having a problem with the screen capture for the IDE.
The problem is that it does not seem to take the mouse events. I get
to the gray screen to select the area to capture, but it does not do
the selection (white rectangle with red lines). The only way out of
the screen capture is by pressing ESC.
This does not happen every time, and so far I have not figured out how
to consistently reproduce this issue.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1238027/+subscriptions
References