Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901623

Cygwin console steals focus after a regression test

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3
    • None
    • None
    • tools
    • None
    • Windows 7 or later, Cygwin (old or recent as of Jan 2015)

    • windows

    Description

      Here's a simplest example of the issue: run a series of 2 regression tests on a supported Windows release in a cygwin console like this:

      jtreg -jdk:jdk9/current -va \
      javax/swing/text/DefaultEditorKit/4278839/bug4278839.java \
      javax/swing/text/JTextComponent/5074573\/bug5074573.java

      Running the tests one by one (means, starting jtreg from a console by two commands), everything is OK. As a pair, the second fails. As you can see, every test starts, paints a Frame and presumes the keyboard focus is on it. However after the first test, it is in Cygwin console.

      In the regression suite runs, we have this issue manifested in random places, mostly when an interactive test requiring (and presuming) initial focus runs after a similar test. In which sense "after", it is not exactly clear, and this obviously adds to the confusion.

      Note also that a default Windows command console doesn't have this problem.

      The focus expert Anton Tarasov thinks there may be a set of flags in Cygwin console application, perhaps inherited from Windows XP era, which dictates the console to behave like this.

      Obviously it is not a Java issue, however we use Cygwin as a standard testing environment and have to do something about it.
      Propose a workaround?
      Modify a machine setup routine?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yan Yuri Nesterenko
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: