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 3065

Summary: Screen is flickering during closing on-screen keyboard on Android
Product: SDL Reporter: Deve <deveee>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann
Version: HG 2.1   
Hardware: ARM   
OS: Android (All)   
Attachments: example which was used to reproduce the bug
recorded attached example run on android
patch to maybe fix the flicker

Description Deve 2015-07-16 18:55:36 UTC
Created attachment 2221 [details]
example which was used to reproduce the bug

When I'm trying to close on-screen keyboard using SDL_StopTextInput() function by touching the screen (SDL_FINGERUP or SDL_FINGERDOWN event), the screen is flickering. It is white for a while.

Note that it usually works without problems when I use phone's "back" button. I noticed flickering occasionally too, but not that often.

I thought that it's something wrong with my code, but I prepared an simple example and it is perfectly reproducible for me.ex

I tested it on current mercurial version.

I'm attaching an example code, which I use to reproduce it and recorded this example "in action" in avi file. Sorry about very high compression.
Comment 1 Deve 2015-07-16 18:58:56 UTC
Created attachment 2222 [details]
recorded attached example run on android
Comment 2 Philipp Wiesemann 2015-12-08 19:22:39 UTC
Thank you for reporting this problem.

Does this also happen in portrait orientation (or only in landscape)?
Comment 3 Philipp Wiesemann 2015-12-08 19:27:47 UTC
Created attachment 2333 [details]
patch to maybe fix the flicker

The attached patch maybe fixes the flicker but not the actual fault causing it.
Comment 4 Deve 2015-12-08 20:01:19 UTC
Indeed it seems to work fine when portrait orientation is used. As far as I tested it now, I didn't noticed any issues.

And your patch solves for me the flickering bug with landscape orientation.
Comment 5 Sam Lantinga 2016-10-01 22:15:12 UTC
Patch accepted, thanks!
https://hg.libsdl.org/SDL/rev/282f839d2222