RFR: 8344372: Setting width for TRANSPARENT Stage -> gtk_window_resize: assertion 'height > 0' [v3]

Kevin Rushforth kcr at openjdk.org
Mon Dec 2 20:37:44 UTC 2024


On Sat, 30 Nov 2024 16:14:22 GMT, Thiago Milczarek Sayao <tsayao at openjdk.org> wrote:

>> The bug happened when setting only width or height (not both) on a Stage that was oriented by the view size.
>> 
>> The fix just uses the previous value for width/height if not set.
>> 
>> The test class is designed to accept more test cases in the "mixed sizing" scenarios.
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix test package

The fix works as expected.

The test will catch the failure, but fails for me almost always on one of my machines and very infrequently on another. There is a race condition in the test where the `onShown` event can be delivered before the initial stage size has been realized. I recommend sleeping for 500 msec after getting the `onShown` event and before changing the width of the Stage.

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

PR Review: https://git.openjdk.org/jfx/pull/1654#pullrequestreview-2473855881


More information about the openjfx-dev mailing list