From 637a227d549c56fac4ab129f87039c7547031579 Mon Sep 17 00:00:00 2001 From: Chris Sarbora Date: Wed, 21 Jan 2026 17:54:59 -0600 Subject: [PATCH] Include Android IME in Window Inset calculation Android's IME (software keyboard) reports its covered region of the screen via the Window Insets functionality. When it is open, it is displayed over the application - so there needs to be a way for the application to determine what area is uncovered. The window insets (and SDL_GetWindowSafeArea) mechanism seems to be the best avenue for this. --- .../app/src/main/java/org/libsdl/app/SDLSurface.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java b/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java index 080501c9fa..1c4b66e7ac 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java @@ -199,7 +199,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, WindowInsets.Type.systemGestures() | WindowInsets.Type.mandatorySystemGestures() | WindowInsets.Type.tappableElement() | - WindowInsets.Type.displayCutout()); + WindowInsets.Type.displayCutout() | + WindowInsets.Type.ime()); SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom); }