-
Notifications
You must be signed in to change notification settings - Fork 563
8377350: [iOS] Add support for UIWindowScene #2072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back jpereda! A progress list of the required criteria for merging this PR into |
|
@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: 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 ➡️ To integrate this PR with the above commit message to the |
| GLASS_LOG("SCREEN: %@", screen); | ||
| CGRect applicationFrame = [screen bounds]; | ||
| GLASS_LOG("FRAME: %@", applicationFrame); | ||
| GLASS_LOG("FRAME: %.1f %.1f", applicationFrame.size.width, applicationFrame.size.height); |
There was a problem hiding this comment.
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 @ ?
There was a problem hiding this comment.
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.
johanvos
left a comment
There was a problem hiding this 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.
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 (
keyWindowwas deprecated starting iOS 13, andinitWithFrame: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
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2072/head:pull/2072$ git checkout pull/2072Update a local copy of the PR:
$ git checkout pull/2072$ git pull https://git.openjdk.org/jfx.git pull/2072/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2072View PR using the GUI difftool:
$ git pr show -t 2072Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2072.diff
Using Webrev
Link to Webrev Comment