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

Martin Fox mfox at openjdk.org
Fri Oct 31 16:19:41 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.

There was a request to merge in the latest master but this PR is also marked as ready. Should I go ahead with the merge?

The SizingTest failures on macOS with StageStyle.EXTENDED are due to some weirdness in the OS. When we set the minimum size on an EXTENDED window the OS simply adds 16 units to the minimum height (I can verify this by writing the minSize and then immediately reading it back). I'm still trying to figure out where this magic number comes from. For EXTENDED we add a toolbar but the minimum size of a toolbar is 28 units. In any case I think this is a separate issue. I'll do a bit more research and file a bug.

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

PR Comment: https://git.openjdk.org/jfx/pull/1870#issuecomment-3473826824


More information about the openjfx-dev mailing list