On Wed, 30 Nov 2022 20:47:33 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8294589: cleanup
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
>  line 436:
> 
>> 434:                 if (weakSceneAltKeyEventHandler != null) {
>> 435:                     t.removeEventHandler(KeyEvent.ANY, 
>> weakSceneAltKeyEventHandler);
>> 436:                 }
> 
> So, am I correct that `MenuBarSkin` was badly broken before as it never 
> re-registers these weak handlers when the scene changes?  It does re-register 
> the F10 accelerator, but that's all I can see.
> 
> So a scenario where I have a MenuBar, and I move it to another Scene, it 
> would basically no longer fully function?

Indeed, there were many, many problems with skins.
Had to create a tester to exercise all these scenarios -
https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/apps/LeakTest.java

I wonder if I should move it to manual tests.

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

PR: https://git.openjdk.org/jfx/pull/906

Reply via email to