RFR: 8361521 : BogusFocusableWindowState.java fails with StackOverflowError on Linux [v4]

Sergey Bylokhov serb at openjdk.org
Wed Aug 20 03:36:40 UTC 2025


On Fri, 8 Aug 2025 00:30:25 GMT, Anass Baya <abaya at openjdk.org> wrote:

>> **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
>
> Anass Baya has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - Respect rules
>  - remove space
>  - Update focusability only when it is needed

src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java line 1101:

> 1099:             }
> 1100:         }
> 1101:         if(isVisible() != vis) {

you may add a space "if (isVisible() != vis) {"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26298#discussion_r2286895718


More information about the client-libs-dev mailing list