JDK-8371106 : [macOS] Min/max window height is incorrect for EXTENDED StageStyle
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: jfx25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2025-11-02
  • Updated: 2025-11-14
  • Resolved: 2025-11-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx26 b16Fixed
Related Reports
Relates :  
Description
When the StageStyle is EXTENDED JavaFX adds a hidden NSToolbar to the NSWindow (this toolbar positions the stoplight controls). This alters the behavior of the NSWindow minSize and maxSize properties; when either property is set the OS adds a constant to the height. The amount added seems to be the difference between the nominal title bar height (28) and the height of the combined title bar + toolbar area. The exact value isn't important, we can figure it out by setting the minSize or maxSize property and then immediately querying it to see what the OS added.

To reproduce, run the attached test case and press the "Smaller than Minimum" or "Larger than Maximum" buttons and look at the new window height. In the minimum case it will be 316 instead of 300 and in the maximum case it will be 716 rather than 700. Under the hood this is the amount the OS added to the height of the minSize and maxSize properties.

I should add that if the NSWindow's toolbarStyle is updated the NSWindow will be resized and the minSize and maxSize properties will be adjusted by the OS. I'm not sure if the HeaderBar code can change this property on the fly; if so there are more cases to be tested.
Comments
Changeset: 013e55b1 Branch: master Author: Michael Strauß <mstrauss@openjdk.org> Date: 2025-11-11 05:09:53 +0000 URL: https://git.openjdk.org/jfx/commit/013e55b1ba687d212185d00167f375b816faf8c5
11-11-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1967 Date: 2025-11-10 07:58:17 +0000
10-11-2025