From 3bc1fa0c37d1abe33f97b5bec3c86846002bf228 Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Thu, 21 Aug 2025 12:11:22 +0530 Subject: [PATCH] Fix safe area regression on older Android versions --- .../java/lib/src/org/godotengine/godot/GodotIO.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java index c947652e94..dc68a84c3e 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java @@ -225,7 +225,12 @@ public class GodotIO { } if (topView != null) { - int insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout(); + int insetTypes; + if (godot.isInImmersiveMode()) { + insetTypes = WindowInsetsCompat.Type.displayCutout(); + } else { + insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout(); + } if (topView.getRootWindowInsets() != null) { WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView);