RFR: 8364547: Window size may be incorrect when constrained to min or max [v2]

Kevin Rushforth kcr at openjdk.org
Wed Oct 15 21:07:14 UTC 2025


On Mon, 18 Aug 2025 17:23:43 GMT, Martin Fox <mfox at openjdk.org> wrote:

>> When changing the width and height of a window the platform code is responsible for enforcing the min and max size constraints. If the final width and height don't match the width and height passed into setBounds the platform needs to call notifyResize to correct the window's properties. This happens naturally if the window size actually changes since that will trigger the OS to send size change notifications. If the platform window size doesn't change the OS notifications won't trigger. We need to catch that case and send notifyResize anyway.
>> 
>> This PR does this for Mac and Windows. Linux is being handled in PR #1789 which also includes the system tests for these bugs.
>
> Martin Fox has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove double notifications, keep window min/max/normal state unchanged.

The fix looks good.

Windows: I ran `SizingTest` from PR #1789 (removing the `assumeTrue` that skips the test on Windows), and it fails for me without this fix and passes with this fix.

macOS: I ran `SizingTest` from PR #1789, and I get 8 test failures without this fix and 4 failures with this fix. The 4 failures are all using `StageStyle.EXTENDED`, which might be a different bug.

@beldenfox Can you merge in the latest master (I did when testing and there were no issues)? And can you coment on the `StageStyle.EXTENDED` failures on macOS? I think it would be fine to treat them as a separate bug unless it is easy to fix.

I'll reapprove if you make changes.

@lukostyra or @andy-goryachev-oracle Can one of you be the second reviewer?

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

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1870#pullrequestreview-3342264723
PR Comment: https://git.openjdk.org/jfx/pull/1870#issuecomment-3408271565


More information about the openjfx-dev mailing list