**Analysis:**
The getFocusableWindowState() method is not intended to modify the 
configuration; doing so can cause recursive re-entry on Linux.

**Proposed Fix:**
We are intentionally overriding getFocusableWindowState() to allow it to change 
the configuration, in order to verify that calling getScreenImOn() for 
ownerless windows does not throw any exceptions.
To prevent recursive re-entry, we use a flag to ensure that 
getFocusableWindowState() is executed only once

-------------

Commit messages:
 - Avoid recursive re-entering

Changes: https://git.openjdk.org/jdk/pull/26298/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26298&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8361521
  Stats: 13 lines in 2 files changed: 11 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26298.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26298/head:pull/26298

PR: https://git.openjdk.org/jdk/pull/26298

Reply via email to