Skip to content

Android: restore the system bars when leaving fullscreen on API 30+#16001

Merged
slouken merged 1 commit into
libsdl-org:mainfrom
klirktag:restore-system-bars-when-leaving-fullscreen-on-API-30+
Jul 15, 2026
Merged

Android: restore the system bars when leaving fullscreen on API 30+#16001
slouken merged 1 commit into
libsdl-org:mainfrom
klirktag:restore-system-bars-when-leaving-fullscreen-on-API-30+

Conversation

@klirktag

@klirktag klirktag commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

My old PR #15867 switched the fullscreen path to WindowInsetsController.hide() for API 30+, because the legacy setSystemUiVisibility() flags are ignored on API 30+.

The leaving fullscreen path was left untouched: it still calls setSystemUiVisibility(SYSTEM_UI_FLAG_VISIBLE), which is equally ignored on API 30+.

As a result, once fullscreen had hidden the status/navigation bars, they never came back when returning to windowed mode.

This PR fixes that issue.

Existing Issue(s)

issue #15912

My old PR libsdl-org#15867 switched the fullscreen path to WindowInsetsController.hide() for API 30+, because the legacy setSystemUiVisibility() flags are ignored on API 30+.

The leaving fullscreen path was left untouched: it still calls setSystemUiVisibility(SYSTEM_UI_FLAG_VISIBLE), which is equally ignored on API 30+.

As a result, once fullscreen had hidden the status/navigation bars, they never came back when returning to windowed mode.
@klirktag
klirktag force-pushed the restore-system-bars-when-leaving-fullscreen-on-API-30+ branch from 8bc47de to 44ae2a7 Compare July 15, 2026 00:09
@klirktag
klirktag marked this pull request as ready for review July 15, 2026 00:10
@slouken

slouken commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

@AntTheAlchemist, can you confirm whether this is a good fix, and takes care of the issues you're seeing?

@AntTheAlchemist

Copy link
Copy Markdown
Contributor

Thanks @klirktag.

@slouken, this fixes the return of the status and the nav bar. But other problems remain:

On API 30, the initial non-fullscreen window is sized to the safe zone. Going fullscreen resizes the window to the entire screen, as expected, but returning from full screen, leaves the window size full screen. Expected: initial windowed window should be the whole screen. This works as expected on API 34 & 35.

On all APIs the safe zone never changes. Expected: it should expand into status and nav bars when they are hidden.

@slouken
slouken merged commit 8408a66 into libsdl-org:main Jul 15, 2026
10 checks passed
@slouken

slouken commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

@AntTheAlchemist, can you open those as separate issues for tracking? @klirktag are you able to take a look at them?

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.

3 participants