kivy/kivy — pull request #2301 by matham (2014-06-29 06:16:35+00:00)
Title: Fix hint_text disappearing

Fixes #1690.

The issue is that the textinput cache stored textures generated by the label. The problem is that (on windows atleast, although I don't see why other OS wouldn't experience the same issue), after a resize, all the textures become stale.

The solution is to store the labels, which automatically update their textures upon a reload and only get their textures just before it needs to be displayed. This ensures the textures are always the most recent. It does entail caching the labels themselves, which might use more memory, but it ensures what is displayed is correct.

I do wonder though why the hint_text disappearing is not observed on other OS (or is it). Do the textures themselves get automatically updated in those cases?

The other solution would be to always recreate the labels and not cache them at all. I think the reason the text doesn't always disappear has to do with the order on which the textures are updated and created. Because if the textures are created, and the context is not reloaded, the textures would not go stale. But again, I think storing textures is unreliable because of this.