Skip to content

Conversation

@jperedadnr
Copy link
Collaborator

@jperedadnr jperedadnr commented Feb 11, 2026

This PR adds support for iOS native window scene, which was added some time ago starting iOS 13 (in 2019).

Current iOS development requires iOS SDK 26, and minimum deployment target is set to iOS 15 (meaning that apps will run on all devices with iOS 15 or greater).

It is safe then to not include the safe-guard if (@available(iOS 13.0, *)) {...}, which will make the code more complex.

Adding the native UIScene and UIWindowScene APIs follows the Apple standards, but as a fallback, the deprecated API is still kept there (keyWindow was deprecated starting iOS 13, and initWithFrame: was deprecated starting iOS 26). This is for a follow-up issue.

Note: This patch doesn't really add support for multiple windows, as this would require more complex changes.


Progress

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

Issue

  • JDK-8377350: [iOS] Add support for UIWindowScene (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2072

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 11, 2026

👋 Welcome back jpereda! 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 Feb 11, 2026

@jperedadnr 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:

8377350: [iOS] Add support for UIWindowScene

Reviewed-by: jvos

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Feb 11, 2026
@mlbridge
Copy link

mlbridge bot commented Feb 11, 2026

Webrevs

GLASS_LOG("SCREEN: %@", screen);
CGRect applicationFrame = [screen bounds];
GLASS_LOG("FRAME: %@", applicationFrame);
GLASS_LOG("FRAME: %.1f %.1f", applicationFrame.size.width, applicationFrame.size.height);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aren't the dimensions printed when you print the "object" using @ ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, CGRect is a struct, and you get this warning:

warning: format specifies type 'id' but the argument has type 'CGRect' (aka 'struct CGRect') [-Wformat]

which can be safely ignored of course, but then the logs won't show a null value:

FRAME: (null)

and that's why I applied the change.

Copy link
Collaborator

@johanvos johanvos left a comment

Choose a reason for hiding this comment

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

Looks good. This PR only touches ios-specific files, and does not affect any other platform.

@openjdk openjdk bot added the ready Ready to be integrated label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Ready to be integrated rfr Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants