Skip to content

Comments

Propagate interface orientation and status bar behaviors to layers#2686

Merged
ASalavei merged 21 commits intojb-mainfrom
andrei.salavei/support-orintation-status-bar-style
Jan 20, 2026
Merged

Propagate interface orientation and status bar behaviors to layers#2686
ASalavei merged 21 commits intojb-mainfrom
andrei.salavei/support-orintation-status-bar-style

Conversation

@ASalavei
Copy link

Propagate interface orientation as well as status bar flags from the windows that contains Compose container to the platform layers view controller.

Fixes https://youtrack.jetbrains.com/issue/CMP-9472/Popup-window-should-follow-the-rotation-appearance-methods-with-the-main-container

Release Notes

Features - iOS

  • Popups and Dialogs now use the same interface orientation and status bar behaviour as the root view controller on the window.

@ASalavei ASalavei requested a review from svastven January 15, 2026 13:28
@svastven
Copy link

Can we also add a test specific to the Popup orientation bug?

ASalavei and others added 2 commits January 16, 2026 17:14
Review Compose PR for Orientation and Status Bar Updates
@JetBrains JetBrains deleted a comment from github-actions bot Jan 16, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 16, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 16, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 16, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 19, 2026
Review Pull Request for Interface Orientation and Status Bar Changes
@JetBrains JetBrains deleted a comment from github-actions bot Jan 19, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 19, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 19, 2026
@JetBrains JetBrains deleted a comment from github-actions bot Jan 19, 2026
override fun userInterfaceStyleDidChange() {}

override fun preferredInterfaceOrientationForPresentation(): UIInterfaceOrientation {
return referenceWindow?.rootViewController?.preferredInterfaceOrientationForPresentation()

Choose a reason for hiding this comment

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

Are we guaranteed that referenceWindow can never be the internal LayersWindow (whose rootViewController is ComposeLayersViewController)? If that happens, preferredInterfaceOrientationForPresentation / supportedInterfaceOrientations / shouldAutorotate will end up calling themselves via referenceWindow.rootViewController and recurse.

It might be worth guarding against this explicitly, e.g. if (referenceWindow?.rootViewController === this) { ... }, or otherwise ensuring referenceWindow is always the host window.

Copy link
Author

@ASalavei ASalavei Jan 20, 2026

Choose a reason for hiding this comment

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

Are we guaranteed that referenceWindow can never be the internal LayersWindow

Thanks for the comment! referenceWindow could be a LayersWindow, but it will never be the same LayersWindow that contains current view controller, so this will never be an endless recursion.

@ASalavei ASalavei requested a review from harrytmthy January 20, 2026 09:49
GitHub AI Assistant: Review iOS Orientation and Status Bar PR Changes
@JetBrains JetBrains deleted a comment from github-actions bot Jan 20, 2026
ASalavei and others added 5 commits January 20, 2026 11:58
@JetBrains JetBrains deleted a comment from github-actions bot Jan 20, 2026
@ASalavei ASalavei merged commit afc96a0 into jb-main Jan 20, 2026
25 of 26 checks passed
@ASalavei ASalavei deleted the andrei.salavei/support-orintation-status-bar-style branch January 20, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants