mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-14 23:38:14 +00:00
The text input state has been changed to be window-specific.
SDL_StartTextInput(), SDL_StopTextInput(), SDL_TextInputActive(), SDL_ClearComposition(), and SDL_SetTextInputRect() all now take a window parameter. This change also fixes IME candidate positioning when SDL_SetTextInputRect() is called before SDL_StartTextInput(), as is recommended in the documentation.
This commit is contained in:
@@ -1252,7 +1252,7 @@ JNIEXPORT jboolean JNICALL SDL_JAVA_INTERFACE(onNativeSoftReturnKey)(
|
||||
JNIEnv *env, jclass jcls)
|
||||
{
|
||||
if (SDL_GetHintBoolean(SDL_HINT_RETURN_KEY_HIDES_IME, SDL_FALSE)) {
|
||||
SDL_StopTextInput();
|
||||
SDL_StopTextInput(Android_Window);
|
||||
return JNI_TRUE;
|
||||
}
|
||||
return JNI_FALSE;
|
||||
@@ -1263,7 +1263,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeKeyboardFocusLost)(
|
||||
JNIEnv *env, jclass jcls)
|
||||
{
|
||||
/* Calling SDL_StopTextInput will take care of hiding the keyboard and cleaning up the DummyText widget */
|
||||
SDL_StopTextInput();
|
||||
SDL_StopTextInput(Android_Window);
|
||||
}
|
||||
|
||||
/* Touch */
|
||||
|
Reference in New Issue
Block a user