We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3186

Summary: SW Keyboard not restore when an app becomes foreground.
Product: SDL Reporter: Hak Matsuda <hakuro>
Component: eventsAssignee: Sylvain <sylvain.becker>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: Other   
OS: Android (All)   
Attachments: patch

Description Hak Matsuda 2015-11-21 00:57:36 UTC
SW keyboard shown by SDL_StartTextInput() not restored when an app becomes foreground on Android.
In this situation, SDL_IsTextInputActive() still thinks the input session is going on.

Repro step:
1) Show SW keyboard in an app by SDL_StartTextInput()
2) Send the app to background (SW keyboard is hidden at this point).
3) Make the app foreground.
Comment 1 Sylvain 2017-08-13 17:40:15 UTC
Created attachment 2837 [details]
patch

It's not really obvious to show back the keyboard when the app resumes, but this patch seems to improve the function that tell if the keyboard is shown or not.
Comment 2 Sam Lantinga 2017-08-14 04:05:32 UTC
Sylvain, your patch is in, thanks!
https://hg.libsdl.org/SDL/rev/ab3f2402a777
Comment 3 Sylvain 2017-08-14 09:03:56 UTC
Oops, I've added a java openURL function which is not needed !
Comment 4 Sylvain 2017-08-14 09:10:18 UTC
related to bug 3187
Comment 5 Sylvain 2018-12-30 14:45:21 UTC
Fixed in https://hg.libsdl.org/SDL/rev/55f828c2af46 

Maybe android Start/StopTextInput function could be changed as Show/HideScreenKeyboard. 

And this behavior could be done in the generic layer
Comment 6 Sylvain 2018-12-30 14:46:10 UTC
Marked as fixed!