← Back to team overview

sikuli-driver team mailing list archive

[Bug 1238027] Re: [1.0.1] Linux: Screen capture sometimes fails to create a selection

 

again thanks.

I guess, that the real problem behind has been the fact, that the IDE normally was not set invisible at the beginning of the capture()::run(), since the delay in most cases is not null.
And this might have been a conflict on Linux.

Nevertheless, i changed it this way:
public void capture(final int delay) {
  if (_isCapturing) {
    return;
  }
  Thread t = new Thread("capture") {
    @Override
    public void run() {
      _isCapturing = true;
      SikuliIDE ide = SikuliIDE.getInstance();
      ide.setVisible(false);
      try {
        Thread.sleep(delay);
      } catch (Exception e) {
      }
      OverlayCapturePrompt p = new OverlayCapturePrompt(null, ButtonCapture.this);
      p.prompt("Select an image");
    }
  };
  t.start();
}

... and moved the come back of the IDE window to the end of
captureCompleted() (so we have it at the very end only once)

-- 
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