Skip to content

Propagate interface orientation and status bar behaviors to layers#2686

Merged
Andrei Salavei (ASalavei) merged 21 commits into
jb-mainfrom
andrei.salavei/support-orintation-status-bar-style
Jan 20, 2026
Merged

Propagate interface orientation and status bar behaviors to layers#2686
Andrei Salavei (ASalavei) merged 21 commits into
jb-mainfrom
andrei.salavei/support-orintation-status-bar-style

Conversation

@ASalavei

Copy link
Copy Markdown

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.

…e/ui/scene/ComposeLayersViewControllerTest.kt

Co-authored-by: Vendula Švastalová <vendula.svastalova@jetbrains.com>
@svastven

Copy link
Copy Markdown

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

Review Compose PR for Orientation and Status Bar Updates
Review Pull Request for Interface Orientation and Status Bar Changes
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.

@ASalavei Andrei Salavei (ASalavei) Jan 20, 2026

Copy link
Copy Markdown
Author

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.

GitHub AI Assistant: Review iOS Orientation and Status Bar PR Changes
@ASalavei Andrei Salavei (ASalavei) merged commit afc96a0 into jb-main Jan 20, 2026
25 of 26 checks passed
@ASalavei Andrei Salavei (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