Fix SDL_StartTextInputWithProperties
not updating input type on android
#11448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
RFC, not final PR. MVP that fixes this on Android.
Fixes
SDL_StartTextInputWithProperties
so that the requestedSDL_PROP_TEXTINPUT_TYPE_NUMBER
is always applied. Tested on Android. Previously, if a screen keyboard was already shown (eg. text input already active), the properties would be ignored.This change allows the following application code to work:
Does this series of calls make sense from an API standpoint? Do you think the application should call
SDL_StartTextInputWithProperties()
→SDL_StopTextInput()
→SDL_StartTextInputWithProperties()
? (Seems less ideal, as it might flick the keyboard unnecessarily.)I've not checked that calling
ShowScreenKeyboard()
when the keyboard is already shown works as expected on other platforms (only Android is tested and updated).Existing Issue(s)
Calls to
SDL_StartTextInputWithProperties
when text input is already active will be ignored by android (the keyboard type presented to the user will not change).TextBox
to specify type of text being input ppy/osu-framework#6408 (comment)