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.
This commit is contained in:
Chris Sarbora 2026-01-21 17:54:59 -06:00
parent 65864190cc
commit 637a227d54
No known key found for this signature in database

View file

@ -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);
}