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 - SW Keyboard not restore when an app becomes foreground.
Summary: SW Keyboard not restore when an app becomes foreground.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.3
Hardware: Other Android (All)
: P2 normal
Assignee: Sylvain
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-21 00:57 UTC by Hak Matsuda
Modified: 2018-12-30 14:46 UTC (History)
0 users

See Also:


Attachments
patch (3.78 KB, patch)
2017-08-13 17:40 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!