mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-06 07:38:38 +00:00
Send SDL_EVENT_SCREEN_KEYBOARD_HIDDEN when the keyboard is hidden on Android
This commit is contained in:
@@ -208,6 +208,12 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
WindowInsets.Type.displayCutout());
|
||||
|
||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, combined.top, combined.bottom);
|
||||
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
SDLActivity.onNativeScreenKeyboardShown();
|
||||
} else {
|
||||
SDLActivity.onNativeScreenKeyboardHidden();
|
||||
}
|
||||
}
|
||||
|
||||
// Pass these to any child views in case they need them
|
||||
|
||||
@@ -5900,7 +5900,7 @@ bool SDL_ScreenKeyboardShown(SDL_Window *window)
|
||||
|
||||
void SDL_SendScreenKeyboardShown(void)
|
||||
{
|
||||
if (_this->screen_keyboard_shown) {
|
||||
if (!_this || _this->screen_keyboard_shown) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5916,7 +5916,7 @@ void SDL_SendScreenKeyboardShown(void)
|
||||
|
||||
void SDL_SendScreenKeyboardHidden(void)
|
||||
{
|
||||
if (!_this->screen_keyboard_shown) {
|
||||
if (!_this || !_this->screen_keyboard_shown) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user