[Rev 04] RFR: 8241840: Memoryleak: Closed focused Stages are not collected with Monocle.

Ambarish Rapte arapte at openjdk.java.net
Mon Apr 27 15:11:28 UTC 2020


On Wed, 22 Apr 2020 12:03:34 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

>> Closed focused Stages are not collected with Monocle
>> 
>> This commit adds a unit-test and a fix for collecting focused closed stages.
>> 
>> ticket: https://bugs.openjdk.java.net/browse/JDK-8241840
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
> 
>   JDK-8241840
>   The tests are now reused for native and monocle tests.

modules/javafx.graphics/src/main/java/com/sun/glass/ui/Window.java line 1325:

> 1324:             this.isFocused = focused;
> 1325:             if (this.isFocused && this.isVisible) {
> 1326:                 setFocusedWindow(this);

On my Window10 machine, with this change, `Window.focusedWindow` remains `null` even after the first window is shown
onto the screen and is focused. And It continues to remain `null` until some mouse or key action is performed on the
window. I am not sure if this causes any side effects. It looks like the `Window.focusedWindow` is mostly(only) used
for Monocle. Can you please confirm the behavior that `Window.focusedWindow` remain `null` and check for any side
effects.

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

PR: https://git.openjdk.java.net/jfx/pull/153


More information about the openjfx-dev mailing list