Skip to content

Conversation

@mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Nov 10, 2025

This patch fixes window size contraints for an EXTENDED stage. In contrast to the suggested workaround in the JBS ticket of querying the value of NSWindow.minSize to find out the added size for the toolbar, I've found it easier to set the NSWindow.contentMinSize property instead.

This is only done for EXTENDED stages, preserving the existing behavior for all other stage styles, and it works because extended stages use a full-size content view that covers the entire window. It also makes it unnecessary to take the toolbar height into consideration, which would be necessary if we used the minSize property instead.

/reviewers 2


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8371106: [macOS] Min/max window height is incorrect for EXTENDED StageStyle (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1967/head:pull/1967
$ git checkout pull/1967

Update a local copy of the PR:
$ git checkout pull/1967
$ git pull https://git.openjdk.org/jfx.git pull/1967/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1967

View PR using the GUI difftool:
$ git pr show -t 1967

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1967.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 10, 2025

👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 10, 2025

@mstr2 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8371106: [macOS] Min/max window height is incorrect for EXTENDED StageStyle

Reviewed-by: angorya, kcr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

  • f8bef15: 8366201: RichTextArea: remove allowUndo parameter
  • d166023: 8371302: [Windows] Stage coordinates in secondary display are not properly updated after changing settings of first display

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Ready for review label Nov 10, 2025
@openjdk
Copy link

openjdk bot commented Nov 10, 2025

@mstr2
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@mlbridge
Copy link

mlbridge bot commented Nov 10, 2025

Webrevs

Copy link
Contributor

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing looks good.

{
GlassWindow *window = getGlassWindow(env, jPtr);
[window->nsWindow setMinSize:NSMakeSize(jW, jH)];
NSSize minSize = NSMakeSize(jW, jH);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this structure need to be freed at some point?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a value struct, no heap allocation going on. So it doesn't need to be freed.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good.

I confirm that it fixes the standalone test case attached to the bug and fixes the test failures I was seeing in the new SizingTest test added as part of PR #1789.

@openjdk openjdk bot added the ready Ready to be integrated label Nov 10, 2025
@mstr2
Copy link
Collaborator Author

mstr2 commented Nov 11, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

Going to push as commit 013e55b.
Since your change was applied there have been 3 commits pushed to the master branch:

  • 637cb63: 8371052: Update libFFI to 3.5.2
  • f8bef15: 8366201: RichTextArea: remove allowUndo parameter
  • d166023: 8371302: [Windows] Stage coordinates in secondary display are not properly updated after changing settings of first display

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 11, 2025
@openjdk openjdk bot closed this Nov 11, 2025
@openjdk openjdk bot removed ready Ready to be integrated rfr Ready for review labels Nov 11, 2025
@openjdk
Copy link

openjdk bot commented Nov 11, 2025

@mstr2 Pushed as commit 013e55b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mstr2 mstr2 deleted the fixes/window-size-contraints branch November 11, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants